1
我試圖自定義由GDirections對象繪製的圖標。我有一個我用來構造路徑的經緯度座標列表。但是,我找不到任何自定義(甚至關閉)由API自動放置的標記的方法。谷歌地圖顯示自定義路徑
var map;
map = new GMap2(document.getElementById("map_canvas"));
.... //get the path coordinates
var route = new GDirections(map);
route.load(path_coordinates);
調用route.getPolyline().hide()
隱藏路徑而不是標記。調用route.getMarker(1).isHidden()
返回true,顯然隱藏它不會改變任何東西。 這個功能不被api支持嗎? 我使用的地圖API 2.81
感謝您的回答。我正在嘗試同樣的事情,但使用'load'事件。 – Pavel 2010-03-04 12:05:53