var map; var markers = []; var infoWindow; var latlng; var styledMap; function initialize( path ) { var styles = [ { "featureType": "all", "elementType": "geometry", "stylers": [ { "color": "#eef0f0" } ] }, { "featureType": "all", "elementType": "labels.text.fill", "stylers": [ { "gamma": 0.01 }, { "lightness": 20 } ] }, { "featureType": "all", "elementType": "labels.text.stroke", "stylers": [ { "saturation": -31 }, { "lightness": -33 }, { "weight": 2 }, { "gamma": 0.8 } ] }, { "featureType": "all", "elementType": "labels.icon", "stylers": [ { "visibility": "off" } ] }, { "featureType": "landscape", "elementType": "geometry", "stylers": [ { "lightness": 30 }, { "saturation": 30 } ] }, { "featureType": "poi", "elementType": "geometry", "stylers": [ { "saturation": 20 } ] }, { "featureType": "poi.park", "elementType": "geometry", "stylers": [ { "lightness": 20 }, { "saturation": -20 } ] }, { "featureType": "road", "elementType": "geometry", "stylers": [ { "lightness": 10 }, { "saturation": -30 } ] }, { "featureType": "road", "elementType": "geometry.stroke", "stylers": [ { "saturation": 25 }, { "lightness": 25 } ] }, { "featureType": "water", "elementType": "all", "stylers": [ { "lightness": -20 } ] } ]; styledMap = new google.maps.StyledMapType(styles, {name: "York Maze"}); latlng = new google.maps.LatLng(53.939444, -0.986011); var myOptions = { zoom: 11, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); marker = new google.maps.Marker({ position: latlng, map: map, title:"York Maze", icon: path+'../images/map-icon.png' }); map.mapTypes.set('map_style', styledMap); map.setMapTypeId('map_style'); }