简体   繁体   English

如何更改谷歌地图的颜色

[英]How to change color of google map

I found something how to customize my googlemap enter link description here - but what I didnt find is -> you know for example option ROADMAP. 我在这里找到了一些如何自定义我的googlemap 输入链接描述的方法 -但我没有找到->您知道例如ROADMAP选项。 here is map , on this mop is many colors like green, yellow etc. it is possible to make this map black and white or in Grayscale? 这是地图,此拖把上有许多颜色,例如绿色,黄色等。可以将地图设为黑白还是灰度? Thanks 谢谢

Here example for set style to map of google map with google Map API :), I hope this help URL: https://developers.google.com/maps/documentation/javascript/styling 在此示例中,使用Google Map API将样式设置为Google Map的地图:),希望此帮助URL: https : //developers.google.com/maps/documentation/javascript/styleling

var styles = [
  {
    stylers: [
      { hue: "#00ffe6" },
      { saturation: -20 }
    ]
  },{
    featureType: "road",
    elementType: "geometry",
    stylers: [
      { lightness: 100 },
      { visibility: "simplified" }
    ]
  },{
    featureType: "road",
    elementType: "labels",
    stylers: [
      { visibility: "off" }
    ]
  }
];

map.setOptions({styles: styles});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM