2014-04-01 60 views
4

這裏是我的問題:我有一個風格的谷歌地圖顯示谷歌地圖的JavaScript API - 造型建築

enter image description here

。我似乎無法讓大學的建築物像其他建築物一樣無色和str str。我看過這裏的文檔:https://developers.google.com/maps/documentation/javascript/reference#MapTypeStyleFeatureType

並嘗試過他們都沒有他們的工作。

這裏是我的風格:

[ 
    { 
     "featureType":"water", 
     "elementType":"geometry", 
     "stylers":[ 
     { 
      "color":"#193341" 
     } 
     ] 
    }, 
    { 
     "featureType":"landscape", 
     "elementType":"geometry.fill", 
     "stylers":[ 
     { 
      "color":"#2c5a71" 
     } 
     ] 
    }, 
    { 
     "featureType":"landscape", 
     "elementType":"geometry.stroke", 
     "stylers":[ 
     { 
      "color":"#2c5a71" 
     }, 
     { 
      "lightness":-50 
     } 
     ] 
    }, 
    { 
     "featureType":"road", 
     "elementType":"geometry", 
     "stylers":[ 
     { 
      "color":"#29768a" 
     }, 
     { 
      "lightness":-37 
     } 
     ] 
    }, 
    { 
     "featureType":"poi", 
     "elementType":"geometry", 
     "stylers":[ 
     { 
      "color":"#406d80" 
     } 
     ] 
    }, 
    { 
     "featureType":"transit", 
     "elementType":"geometry", 
     "stylers":[ 
     { 
      "color":"#406d80" 
     } 
     ] 
    }, 
    { 
     "elementType":"labels.text.stroke", 
     "stylers":[ 
     { 
      "visibility":"on" 
     }, 
     { 
      "color":"#3e606f" 
     }, 
     { 
      "weight":2 
     }, 
     { 
      "gamma":0.84 
     } 
     ] 
    }, 
    { 
     "elementType":"labels.text.fill", 
     "stylers":[ 
     { 
      "color":"#ffffff" 
     } 
     ] 
    }, 
    { 
     "featureType":"administrative", 
     "elementType":"geometry", 
     "stylers":[ 
     { 
      "weight":0.6 
     }, 
     { 
      "color":"#1a3541" 
     } 
     ] 
    }, 
    { 
     "featureType":"poi", 
     "elementType":"labels", 
     "stylers":[ 
     { 
      "visibility":"off" 
     } 
     ] 
    }, 
    { 
     "featureType":"poi.park", 
     "elementType":"geometry", 
     "stylers":[ 
     { 
      "color":"#2c5a71" 
     } 
     ] 
    }, 
    { 
     "featureType":"landscape", 
     "elementType":"geometry", 
     "stylers":[ 
     { 
      "hue":"#406d80" 
     }, 
     { 
      "gamma":1 
     }, 
     { 
      "lightness":1 
     }, 
     { 
      "saturation":0 
     } 
     ] 
    }, 
    { 
     "featureType":"poi", 
     "elementType":"geometry", 
     "stylers":[ 
     { 
      "visibility":"off" 
     } 
     ] 
    } 
] 

它甚至有可能改變那些建築色彩?

回答

0

你地圖上沒有風格的建築物都顯示室內地圖。我認爲你想要做的是設計室內地圖。

不幸的是,我不認爲有一種方法來重新設計室內地圖。我能找到最接近的是:

Remove indoor maps from styled Google Maps

建議的解決方案有:

[ 
    {"stylers": [ {"visibility": "off" } ] }, 
    {"featureType": "water","stylers": [{"visibility": "on"} ] }, 
    {"featureType": "poi","stylers": [ {"visibility": "on"} ]}, 
    {"featureType": "transit","stylers": [{ "visibility": "on"}] }, 
    { "featureType": "landscape","stylers": [ { "visibility": "on" } ] }, 
    { "featureType": "road", "stylers": [{ "visibility": "on" } ] }, 
    { "featureType": "administrative", "stylers": [{ "visibility": "on" } ] }, 
    /* followed by your style if you have specific styles 
    , otherwise remove the last comma */ 

]