/* * Copyright (c) 2005-2006 Andriy Bidochko. * http://www.mapbuilder.net * * The script has been generated by MapBuilder.net service and released to the customer under * The GNU General Public License (GPL), which can be found at: http://www.opensource.org/licenses/gpl-license.php * * This program is free software; you can redistribute it and/or modify it under the terms of the * GNU General Public License as published by the Free Software Foundation; * either version 2 of the License, or any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. */ //That function will return the element of the array returned by map.getMapTypes() that identifies the current map function getCurrentMapTypeNumber(oMap){ var type=-1; for(var ix=0;ix 2.64 * marker.setTooltip(oOptions.label); * marker.setOpacity((oOptions.opasity ? oOptions.opasity : 100)); */ } else { var marker = new GMarker(point, icon); } GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); return marker; } // Zoom map to. Used from InfoWindow function ZoomMapTo(num) { // Get current zoom level var currentZoom = map.getZoom(); // Re-center map newzoom = (currentZoom > 17) ? 17 : ((currentZoom == 0) ? 0 : (currentZoom + 1)); //V2-V1 compatability map.setCenter(aLocations[num][3], newzoom); } // Function is called when sidebar item is clicked or we are dealing with group boxes. function myInfoWindowHtml(num) { // Map rendering with open info window is very slow. Lets center map first. map.setCenter(aLocations[num][3]); // Use markeropenInfoWindowHtml(html) aLocations[num][0].openInfoWindowHtml(aLocations[num][2]); } /* Side Bar */ // Creates a locations list and put it into side bar function createSideBar() { var oUL = document.createElement("ul"); // write links into document. for (var i=0; i[+] Directions: To here - From here
Start address
" } GetGoogleMapsAPIVersion = function() { var v = 0; var scripts = document.getElementsByTagName("SCRIPT") for (var i=0; i'; oMap.getContainer().appendChild(info); } // Global Variables // set map variable var map = null; //set up array of locations var aLocations = new Array; /*************************** Configuration Options ***************************/ /*PDMarker is used to display tooltips when the user hovers over the markers. * PDMarker is a LGPL library provided by Peter Jones. * For details see http://wwww.pixeldevelopment.com/pdmarker.asp */ var usePDMarker = false; // Create a base "tiny" red icon that specifies the shadow, icon dimensions, etc. var iconsm = new GIcon(); iconsm.image = "http://labs.google.com/ridefinder/images/mm_20_red.png"; iconsm.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png"; iconsm.iconSize = new GSize(12, 20); iconsm.shadowSize = new GSize(20, 18); iconsm.iconAnchor = new GPoint(6, 20); iconsm.infoWindowAnchor = new GPoint(5, 1); // Create a base "large" red icon that specifies the shadow, icon dimensions, etc. var iconbig = new GIcon(); iconbig.image = "http://www.google.com/mapfiles/marker.png"; iconbig.shadow = "http://www.google.com/mapfiles/shadow50.png"; iconbig.iconSize = new GSize(20, 34); iconbig.shadowSize = new GSize(37, 34); iconbig.iconAnchor = new GPoint(6, 34); iconbig.infoWindowAnchor = new GPoint(5, 1); // Custom Icon var iconcustom = new GIcon(iconbig); iconcustom.shadow = ''; MapBuilder.prototype.renderMap=function(){ //Render Map Locations map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); // Center the map to the default location and set map type map.setCenter(new GLatLng(56.49889156789072, -4.647216796875), 7, map.getMapTypes()[0]); // Initialize variables var point = null; var footerHtml = null; var InfoHTML = null; var marker = null; /* Options used for PDMarker initialization: * label: tooltip text * opasity: tooltip opasity */ var options = {}; // Add locations point = new GLatLng(55.899378698746865, -3.383445739746093); footerHtml = "
" + "
"; // Define Marker InfoHTML = "
A1 Paint Ball
A1 Paintball located about 15 miles from Edinburgh.
Click here
" + footerHtml + "
"; iconcustom.iconSize = new GSize(25, 27); iconcustom.image = "http://www.paintballinscotland.co.uk/images/splat.gif"; marker = createMarker(point, InfoHTML, iconcustom, options); map.addOverlay(marker); aLocations[0] = new Array(marker, "A1 Paint Ball", InfoHTML, point); point = new GLatLng(55.96726578475587, -3.3971786499023438); footerHtml = "
" + "
"; // Define Marker InfoHTML = "
Bedlam Paintball
Bedlam Paintball site near Edinburgh of map
Click here
" + footerHtml + "
"; iconcustom.iconSize = new GSize(25, 27); iconcustom.image = "http://www.paintballinscotland.co.uk/images/splat.gif"; marker = createMarker(point, InfoHTML, iconcustom, options); map.addOverlay(marker); aLocations[1] = new Array(marker, "Bedlam Paintball", InfoHTML, point); point = new GLatLng(56.614120403085046, -3.945465087890625); footerHtml = "
" + "
"; // Define Marker InfoHTML = "
Perthshire Paintball
Perthshire Paintball located close to Aberfeldy.

Click here for more information on Perthshire Paintball

" + footerHtml + "
"; iconcustom.iconSize = new GSize(25, 27); iconcustom.image = "http://www.paintballinscotland.co.uk/images/splat.gif"; marker = createMarker(point, InfoHTML, iconcustom, options); map.addOverlay(marker); aLocations[2] = new Array(marker, "Perthshire Paintball", InfoHTML, point); point = new GLatLng(55.9124653488091, -3.338813781738281); footerHtml = "
" + "
"; // Define Marker InfoHTML = "
Skirmish Paintball Edinburgh
" + footerHtml + "
"; iconcustom.iconSize = new GSize(25, 27); iconcustom.image = "http://www.paintballinscotland.co.uk/images/splat.gif"; marker = createMarker(point, InfoHTML, iconcustom, options); map.addOverlay(marker); aLocations[3] = new Array(marker, "Skirmish Paintball Edinburgh", InfoHTML, point); // And finnaly create sidebar createSideBar(); }