Make google map monochrom -


this code google map custom marker.

    <script>   var map;   function initialize() {     map = new google.maps.map(document.getelementbyid('map'), {       zoom: 17,       scrollwheel: false,       center: new google.maps.latlng(40.6328215, 22.9468210), //* add here coordinates, here map center *//       maptypeid: google.maps.maptypeid.satellite,   disabledefaultui: true     });     var icons = {       church: {         name: 'church',         icon: 'images/map/pin.png'  //* add here church pin *//       }     };     function addmarker(location) {       var marker = new google.maps.marker({         position: location.position,         icon: icons[location.type].icon,         map: map       });     }     var locations = [       {         position: new google.maps.latlng(40.6328215, 22.9468210),  //* add here church coordinates *//         type: 'church'       }     ];     (var = 0, location; location = locations[i]; i++) {       addmarker(location);     }   }   google.maps.event.adddomlistener(window, 'load', initialize); </script> 

how can add stylers code colour of map become black , white?

i know need add this:

    stylers: [     {saturation: '-100'} ] 

i don't know how it! can please tell how this?

thank all!

there several sample on net here can find collection

https://snazzymaps.com/explore?color=white

this sample greyscale

[     {         "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             }         ]     } ] 

Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -