2016-07-26 121 views
1

在下圖中,您可以看到我的風格版本和地圖的默認版本。米色的功能在上週的某個時候突然出現,似乎標誌着某種類型的商業區域。Google Maps API:這是什麼功能?

沒有任何列出的功能類型in the API reference似乎影響它。

Styled and unstyled version of a map highlighting the unknown feature

這些都是我已經分配給我的版本地圖的樣式。

googleMapStyle = [ 
     { 
     "featureType": "administrative", 
     "stylers": [ 
      { "visibility": "off" } 
     ] 
     },{ 
     "featureType": "road", 
     "stylers": [ 
      { "visibility": "simple" }, 
      { "color": "#393939" } 
     ] 
     },{ 
     "elementType": "labels", 
     "stylers": [ 
      { "visibility": "off" } 
     ] 
     },{ 
     "featureType": "water", 
     "stylers": [ 
      { "color": "#303030" } 
     ] 
     },{ 
     "featureType": "landscape", 
     "stylers": [ 
      { "color": "#2a2a2a" } 
     ] 
     },{ 
     "featureType": "poi", 
     "stylers": [ 
      { "color": "#393939" }, 
      { "visibility": "off" } 
     ] 
     },{ 
     "featureType": "transit", 
     "elementType": "geometry", 
     "stylers": [ 
      { "visibility": "off" } 
     ] 
     },{ 
     "featureType": "administrative", 
     "elementType": "geometry.stroke", 
     "stylers": [ 
      { "visibility": "on" }, 
      { "color": "#393939" } 
     ] 
     } 
    ]; 

有誰知道這是什麼功能類型以及如何擺脫它?

+0

相關的問題:?如何風格在谷歌地圖的高爾夫球場(沙丘和綠色)(http://stackoverflow.com/questions/38513342/how-to-style-golf-courses-in -google-mapssand-dunes-and-green) – geocodezip

+0

@geocodezip感謝那個問題也解決了我的問題。 – Seraphithan

回答

0

似乎有無證的功能類型。在你的情況下,我發現使用featureType building影響那些,ahem,建築物。

googleMapStyle = [ 
     { 
     "featureType": "building", 
     "stylers": [ 
      { "visibility": "off" } 
     ] 
     },{ 
     ... 
     } 
    ]; 
+0

「建築物」似乎不是「特徵類型」。看起來像地圖遇到未知的「featureType」時,它被視爲「全部」,並且因爲您將它作爲第一條規則工作,並且當我作爲最後一條規則添加時,我的整個地圖消失了。 – Seraphithan

相關問題