var map = null; var marker = null; var mlat = null; var mlng = null; var markers = []; var mc = null; var currentmarker = null; var icon = new google.maps.Icon(G_DEFAULT_ICON); icon.image = "http://atapas.com/wp-content/themes/atapas/images/markeramarillo.png"; // Call this function when the page has been loaded var initialize = function() { if (google.maps.BrowserIsCompatible()) { // Display the map, with some controls and set the initial location map = new google.maps.Map2(document.getElementById("map")); var zoom = 13; if(mlat!=null) zoom = 15; if(currentmarker!=null){ map.setCenter(new google.maps.LatLng(mlat, mlng), zoom); map.addOverlay(currentmarker); } else map.setCenter(new google.maps.LatLng(37.38243439282155, -5.995445251464844), zoom); map.disableDoubleClickZoom(); map.enableScrollWheelZoom(); map.addControl(new google.maps.SmallZoomControl()); map.removeMapType(G_SATELLITE_MAP); map.addControl(new google.maps.MapTypeControl(true)); var mcopts = [{ url: 'http://atapas.com/wp-content/themes/atapas/images/plato.png', height: 42, width: 42, opt_textColor: '#333333' }]; mc = new MarkerClusterer(map, markers, {styles: mcopts}); } // display a warning if the browser was not compatible else { alert("Sorry, the Google Maps API is not compatible with this browser"); } } function setMarkersArray(arr){ for(i=0;i