var mapOpts = { mapTypeId: google.maps.MapTypeId.ROADMAP, scaleControl: true, streetViewControl: true, scrollwheel: true, panControlOptions: { position: google.maps.ControlPosition.RIGHT_TOP }, zoomControlOptions: { style: google.maps.ZoomControlStyle.LARGE, position: google.maps.ControlPosition.RIGHT_TOP }, mapTypeControlOptions: { position: google.maps.ControlPosition.LEFT_TOP } } var map = new google.maps.Map(document.getElementById("map"), mapOpts); // We set zoom and center later by fitBounds() var infoWindow = new google.maps.InfoWindow(); var markerBounds = new google.maps.LatLngBounds(); var image = new google.maps.MarkerImage( 'http://20.web-demo.nl/img/maps/lw_marker_48.png', new google.maps.Size(48,48), new google.maps.Point(0,0), new google.maps.Point(0,48) ); var shadow = new google.maps.MarkerImage( 'http://20.web-demo.nl/img/maps/lw_marker_48.png', new google.maps.Size(82,48), new google.maps.Point(0,0), new google.maps.Point(0,48) ); var shape = { coord: [30,8,31,9,32,10,33,11,34,12,35,13,36,14,36,15,37,16,38,17,39,18,40,19,40,20,40,21,41,22,41,23,40,24,40,25,40,26,40,27,39,28,39,29,38,30,37,31,36,32,33,33,31,34,28,35,26,36,23,37,21,38,18,39,13,39,11,38,9,37,8,36,8,35,7,34,7,33,7,32,7,31,7,30,7,29,7,28,7,27,7,26,7,25,7,24,7,23,7,22,6,21,6,20,7,19,7,18,8,17,8,16,9,15,10,14,12,13,14,12,17,11,19,10,21,9,24,8,30,8], type: 'poly' }; var markerArray = []; function makeMarker(options){ var pushPin = new google.maps.Marker({map:map}); pushPin.setOptions(options); google.maps.event.addListener(pushPin, "click", function(){ infoWindow.setOptions(options); infoWindow.open(map, pushPin); }); markerBounds.extend(options.position); markerArray.push(pushPin); return pushPin; } google.maps.event.addListener(map, "click", function(){ infoWindow.close(); }); makeMarker({ position: new google.maps.LatLng(53.144569, 6.371636), content: "

Aan de Es

Aan de Es
Leek
Groningen", width: 795, title: "Langewold Beheer", icon: image, shadow: shadow }); map.fitBounds(markerBounds); var listener = google.maps.event.addListener(map, "idle", function() { if (map.getZoom() > 15) map.setZoom(15); google.maps.event.removeListener(listener); });