var googleMarkersMap = {}; function NuonMap(mapElement, markers) { this.map = new GMap2(mapElement); this.markers = markers; this.baseIcon = ""; this.markerImgMap = new Array(); } NuonMap.prototype = { init:function() { // Center map at Netherlands this.map.setCenter(new GLatLng(52.268157, 4.49340), 7); // Satalite map this.map.setMapType(G_SATELLITE_MAP); // Enable zoom // map.enableScrollWheelZoom(); this.map.enableDoubleClickZoom(); // Add type controle this.map.addControl(new GMapTypeControl()); this.map.addControl(new GSmallZoomControl()); this.map.addControl(new GScaleControl()); this.addMarkers(); }, createIcon:function(url, width, height) { var baseIcon = new GIcon(G_DEFAULT_ICON); baseIcon.image = url; var dims = this.determineSize(url, width, height); if (dims['width'] > 0 && dims['height'] > 0) { width = dims['width']; height = dims['height'] } baseIcon.iconSize = new GSize(width, height); //baseIcon.shadowSize = new GSize(37, 34); //baseIcon.iconAnchor = new GPoint(0, 0); //baseIcon.infoWindowAnchor = new GPoint(0, 0); //this.baseIcon.infoShadowAnchor = new GPoint(18, 25); return baseIcon; }, createMarker:function(point, customIcon, title, info) { markerOptions = { icon:customIcon, title:title }; var marker = new GMarker(point, markerOptions); if (info != null) { GEvent.addListener(marker, "click", function() { marker.openInfoWindow(info, { maxWidth:422}); }); } return marker; }, addMarkers:function() { var rows = this.markers.rows; // First row is TH row. for (var i=1;i