google-maps – Google Maps API v3隐藏“滑雪道”

无论如何要隐藏Google默认和地形图中的滑雪道吗?

我们可以使用“featureType”道路隐藏道路并关闭设置可见性.但似乎没有相当于滑雪道或滑雪道.

http://techcrunch.com/2013/03/25/google-adds-trail-maps-for-100-additional-ski-resorts-to-google-maps/

最佳答案 这是我隐藏滑雪场的黑客行为:

   map.setOptions({styles: [
  {
     "featureType": "all", // non valid, hide all
     "stylers": [{ "visibility": "off" }]
  },
  {
      "featureType": "administrative",
      "elementType": "geometry",
      "stylers": [{ "visibility": "on" }]
    },{
      "featureType": "landscape",
      "stylers": [{ "visibility": "on" }]
    },{
      "featureType": "road",
      "stylers": [{ "visibility": "on" }]
    },{
      "featureType": "transit",
      "stylers": [{ "visibility": "on" }]
    },{
      "featureType": "water",
      "stylers": [{ "visibility": "on" }]
    }
]});

你可以在这里看到结果:http://jsfiddle.net/69yG3/2/embedded/result/

点赞