/* * Copyright (c) 2005 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. */ MapBuilder.prototype.addMBInfo=function(oMap){ /* var info=oMap.ownerDocument.createElement('div'); info.id='MapBuilderInfo'; info.style.position='absolute'; info.style.right='1px'; info.style.bottom='25px'; info.style.backgroundColor='transparent'; info.style.zIndex=25500; info.innerHTML='FREE Map Code by MapBuilder.net'; oMap.div.parentNode.appendChild(info); */ } GMap.prototype.addMapBuilder=function(oMap){ oMap.initialize(this); } MapBuilder.prototype.registerMBEvent=function(oMap){ GEvent.addListener(oMap, "maptypechanged", function() { setCreatedColor(oMap); }); } GMap.prototype.addMapBuilder=function(oMap){ oMap.initialize(this); } //Set "Created By Mapbuilder" color based on map type function setCreatedColor(oMap) { /* var info=oMap.ownerDocument.getElementById('CreatedByMapBuilder'); currmaptype = getCurrentMapTypeNumber(oMap); // Regular map if (currmaptype == 0) info.style.color='#000000'; else info.style.color='#FFFFFF'; */ } //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 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]); } function MapBuilder(){} MapBuilder.prototype.initialize=function(oMap){ // Show info this.addMBInfo(oMap); // Event on maptype cahnge this.registerMBEvent(oMap); // Analize current maptype setCreatedColor(oMap); }