2014-10-09 61 views
0

如何在MAP上顯示存儲的android設備的位置。我想在我的地圖上顯示我選擇的出租車(我所在地區的出租車)的位置。駕駛室數量沒有限制。 目前,我以10秒的固定間隔將我的出租車的Latlng存儲在服務器上,然後檢索這些latlng值以在地圖上顯示。我不認爲這是一個好方法,有沒有更好的方法?更新LatLng值以顯示在Google地圖上

回答

0

試試這個

final LatLng obj = new LatLng(21 , 57); // the latitude and longitude of the place 

Marker TP = googleMap.addMarker(new MarkerOptions().position(obj).title("<placeName>")); 

goolgeMap是爲GoogleMap類OBJ ....