Created
November 16, 2017 12:38
-
-
Save MSerj/21df7459fc94f2d5189f27c887419933 to your computer and use it in GitHub Desktop.
Google map gray
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function initMap() { | |
var mapCanvas = document.getElementById('map'); | |
var myLatlng = new google.maps.LatLng(43.235501, 13.633698); | |
var mapOptions = { | |
center: myLatlng, | |
zoom: 17, | |
disableDefaultUI: true, | |
styles: [ | |
{ | |
featureType: "all", | |
elementType: "all", | |
stylers: [ | |
{ saturation: -100 } // <-- THIS | |
] | |
} | |
] | |
}; | |
var map = new google.maps.Map(mapCanvas, mapOptions); | |
var marker = new google.maps.Marker({ | |
position: myLatlng, | |
map: map, | |
icon: 'img/map-marker.png' | |
}); | |
} | |
if ($('#map').length > 0) { | |
google.maps.event.addDomListener(window, 'load', initMap); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment