Skip to content

Instantly share code, notes, and snippets.

@Mdimran41
Created March 23, 2016 03:56
Show Gist options
  • Save Mdimran41/ac03f5caab6b8f4dc0ab to your computer and use it in GitHub Desktop.
Save Mdimran41/ac03f5caab6b8f4dc0ab to your computer and use it in GitHub Desktop.
<script>
var myCenter=new google.maps.LatLng(51.508742,-0.120850);
function initialize()
{
var mapProp = {
center:myCenter,
scrollwheel: false,
zoom:5,
zoomControl:false,
mapTypeControl:false,
streetViewControl:false,
mapTypeId:google.maps.MapTypeId.ROADMAP,
styles: [{"featureType":"landscape","stylers":[{"saturation":-100},
{"lightness":65},{"visibility":"on"}]},
{"featureType":"poi","stylers":[{"saturation":-100},{"lightness":51},{"visibility":"simplified"}]},
{"featureType":"road.highway","stylers":[{"saturation":-100},{"visibility":"simplified"}]},
{"featureType":"road.arterial","stylers":[{"saturation":-100},{"lightness":30},{"visibility":"on"}]},
{"featureType":"road.local","stylers":[{"saturation":-100},{"lightness":40},{"visibility":"on"}]},
{"featureType":"transit","stylers":[{"saturation":-100},{"visibility":"simplified"}]},{"featureType":"administrative.province","stylers":[{"visibility":"off"}]},
{"featureType":"water","elementType":"labels","stylers":[{"visibility":"on"},{"lightness":-25},{"saturation":-100}]},{"featureType":"water","elementType":"geometry","stylers":[{"hue":"#ffff00"},{"lightness":-25},{"saturation":-97}]}]
};
var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);
var marker=new google.maps.Marker({
position:myCenter,
icon:'img/marker.png'
});
marker.setMap(map);
var infowindow = new google.maps.InfoWindow({
content:"London!"
});
infowindow.open(map,marker);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment