$(function(){ var map; var loc = new google.maps.LatLng(56.203469, 10.231029); var locations = [ ]; function initialize() { var stylers = [ { "featureType": "all", "elementType": "all", "stylers": [ { "saturation": "-100" } ] } ]; var mapOptions = { zoom: 7, center: loc, mapTypeId: 'argus', scrollwheel: false }; map = new google.maps.Map(document.getElementById("map"), mapOptions); var styledMapOptions = { map: map, name: "argus-map" } var marker,i; var infowindow = new google.maps.InfoWindow(); var image = new google.maps.MarkerImage( "images/pin_dtb.png", new google.maps.Size(38, 53), new google.maps.Point(0,0), new google.maps.Point(12, 29)); for (i = 0; i < locations.length; i++) { marker = new google.maps.Marker({ icon: image, position: new google.maps.LatLng(locations[i][1], locations[i][2]), map: map, title: locations[i][0] }); google.maps.event.addListener(marker, 'click', (function(marker, i) { return function() { infowindow.setContent("

"+locations[i][0]+"

"); infowindow.open(map, marker); map.setCenter(new google.maps.LatLng(locations[i][1], locations[i][2])); } })(marker, i)); } var testmap = new google.maps.StyledMapType(stylers,styledMapOptions); map.mapTypes.set('argus', testmap); map.setMapTypeId('argus'); }; initialize(); });