102 lines
1.9 KiB
JavaScript
102 lines
1.9 KiB
JavaScript
var myCenter=new google.maps.LatLng(40.8654939,-74.0402033);
|
|
function initialize()
|
|
{
|
|
var mapProp = {
|
|
center:myCenter,
|
|
scrollwheel: false,
|
|
zoom:10,
|
|
mapTypeId:google.maps.MapTypeId.ROADMAP
|
|
};
|
|
var map=new google.maps.Map(document.getElementById("contact-map"),mapProp);
|
|
var marker=new google.maps.Marker({
|
|
position:myCenter,
|
|
icon:'img/map/marker.png',
|
|
map: map,
|
|
});
|
|
|
|
var styles = [
|
|
{
|
|
"featureType": "administrative",
|
|
"elementType": "labels.text.fill",
|
|
"stylers": [
|
|
{
|
|
"color": "#444444"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"featureType": "landscape",
|
|
"elementType": "all",
|
|
"stylers": [
|
|
{
|
|
"color": "#f2f2f2"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"featureType": "poi",
|
|
"elementType": "all",
|
|
"stylers": [
|
|
{
|
|
"visibility": "off"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"featureType": "road",
|
|
"elementType": "all",
|
|
"stylers": [
|
|
{
|
|
"saturation": -100
|
|
},
|
|
{
|
|
"lightness": 45
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"featureType": "road.highway",
|
|
"elementType": "all",
|
|
"stylers": [
|
|
{
|
|
"visibility": "simplified"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"featureType": "road.arterial",
|
|
"elementType": "labels.icon",
|
|
"stylers": [
|
|
{
|
|
"visibility": "off"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"featureType": "transit",
|
|
"elementType": "all",
|
|
"stylers": [
|
|
{
|
|
"visibility": "off"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"featureType": "water",
|
|
"elementType": "all",
|
|
"stylers": [
|
|
{
|
|
"color": "#46bcec"
|
|
},
|
|
{
|
|
"visibility": "on"
|
|
}
|
|
]
|
|
}
|
|
];
|
|
map.setOptions({styles: styles});
|
|
marker.setMap(map);
|
|
}
|
|
google.maps.event.addDomListener(window, 'load', initialize);
|
|
|
|
|