2016-12-02 35 views

回答

1

有一種方法可以做到這一點,它是Marker類的一個可選功能。查找示例的最簡單方法是使用LatLonGridOverlay。我會將邏輯簡化爲下面簡單理解的內容。關鍵是代碼的順序,看標題,然後將圖標設置爲空,然後添加到地圖。你必須找出你想要Marker基於多段線座標的位置,但它確實有效。

Polyline p = new Polyline(); 
List<GeoPoint> pts = new ArrayList<GeoPoint>(); 
//add your points here 
p.setPoints(pts); 

//add to map 

Marker m = new Marker(mapView); 
m.setTitle("Some text here"); 
//must set the icon last 
m.setIcon(null); 
m.setPosition(new GeoPoint(marker location here)); 

//add to map 

source

+0

我補充說,我下面的代碼,但我看不到它仍然 – Temmie

+0

NVM它現在的工作,謝謝! – Temmie

相關問題