// 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 = '';
function onLoad() { if (!GBrowserIsCompatible()) { document.getElementById("MapBuilderMap").innerHTML = "Unfortunately your browser doesn't support Google Maps.<br /> To check browser compatibility visit the following link."; return; }
map = new GMap2(document.getElementById("MapBuilderMap")); var MB = new MapBuilder(map); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); // Center the map to the default location and set map type map.setCenter(new GLatLng(55.869999, -4.27), 13, 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 // And finnaly create sidebar createSideBar(); }
Comments
That's why a man's gotta do it!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Rutherglen
/* Generic map, side bar holder styles */
.MapBuilder {font: normal small verdana, arial, helvetica, sans-serif; font-size: 10pt; margin: 0px;}
.MapBuilder a {text-decoration: none; color: #0066CC; background-color: transparent;}
.MapBuilder a:hover {color: #F60; background-color: transparent;}
.MapBuilder h1 {font-weight: bold; font-size: 16pt; color: #369; border-bottom: 2px solid #369;}
/* Info Window styles */
.IW { width: 350px;}
.IWContent {height: 120px; overflow:auto;}
.IWCaption {font-weight: bold; font-size: 12pt; color: #369; border-bottom: 2px solid #369;}
.IWFooter {margin-top: 5px; font-size: 8pt; }
.IWFooterZoom {}
.IWDirections{background-color:#FFF;}
.MapBuilderSideBar {float:left; margin-left: 10px; }
//<![CDATA[
// 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 = '';
function onLoad() {
if (!GBrowserIsCompatible())
{
document.getElementById("MapBuilderMap").innerHTML = "Unfortunately your browser doesn't support Google Maps.<br /> To check browser compatibility visit the following link.";
return;
}
map = new GMap2(document.getElementById("MapBuilderMap"));
var MB = new MapBuilder(map);
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
// Center the map to the default location and set map type
map.setCenter(new GLatLng(55.869999, -4.27), 13, 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
// And finnaly create sidebar
createSideBar();
}
//]]>
Rutherglen
Glasgow
Created by MapBuilder.net.
Map Locations [-]
Posted: Tuesday, 13 March 2007 at 8:08AM (AEDT)
Mmm.. I actually had private source code in my clipboard memory sorry.. can't paste it here