2012-08-11 14 views
0

Google Map API中是否有任何地方可以隱藏地圖中的巴士?我在mapOptions中找不到任何東西。任何幫助將不勝感激。如何從Google Map對象中隱藏公交車?

enter image description here

+0

相關:https://developers.google.com/maps/documentation/javascript/layers#TransitLayer – 2012-08-11 13:56:02

回答

4

是的,你可以在MapOptions應用樣式:

var mapOptions = { 
     styles: [ 
      { 
      featureType: "transit.station.bus", 
      stylers: [ 
       { visibility: "off" } 
      ] 
      } 
     ]}; 
     map.setOptions(mapOptions); 

更多請見styling wizard