var latitude = "40.681500"; var longitude = "-75.752061"; var site_title = "PCOA"; var address = "P.O. Box 5
New Tripoli, PA 18066"; var address_url = "P.O.+Box+5%2C+New+Tripoli%2C+PA+18066"; var map; function initialize() {// Create an array of styles. var styles = [ { featureType: "water", elementType: "geometry", stylers: [ { hue: "#5a8895" }, { saturation: 20 }, { lightness: -60 }, { visibility: "on" } ] },{ featureType: "landscape", elementType: "geometry", stylers: [ { hue: "#1d455f" }, { saturation: 0 }, { lightness: -60 }, { visibility: "on" } ] },{ featureType: "poi.park", elementType: "geometry", stylers: [ { hue: "#25464c" }, { saturation: 80 }, { lightness: -67 }, { visibility: "on" } ] },{ featureType: "road.highway", elementType: "geometry", stylers: [ { hue: "#25464c" }, { saturation: -95 }, { lightness: -55 }, { visibility: "on" } ] } ]; // Create a new StyledMapType object, passing it the array of styles, // as well as the name to be displayed on the map type control. var styledMap = new google.maps.StyledMapType(styles, {name: "Styled Map"}); var latlng = new google.maps.LatLng(latitude, longitude); // Create a map object, and include the MapTypeId to add // to the map type control. var mapOptions = { zoom: 15, center: latlng, mapTypeControlOptions: { mapTypeIds: [google.maps.MapTypeId.ROADMAP, 'map_style'] } }; var map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions); //Associate the styled map with the MapTypeId and set it to display. map.mapTypes.set('map_style', styledMap); map.setMapTypeId('map_style'); var marker = new google.maps.Marker({ position: latlng, map: map, title: site_title, icon: '/images/icon_acorn_contact.png' }); var directionsURL = 'https://maps.google.com?daddr='+address_url; var contentString = ''+site_title+'
'+address+'
Get Directions'; var infowindow = new google.maps.InfoWindow({ content: contentString }); google.maps.event.addListener(marker, 'click', function() { infowindow.open(map, marker); }); } google.maps.event.addDomListener(window, 'load', initialize);