我想根據經度和緯度座標顯示地圖上的位置。當我按下按鈕時,我想將座標發送到Google地圖(或其他應用程序)並查明該位置。任何想法如何我可以實現這一點?使用座標在Google地圖上查找位置
1
A
回答
1
我已經找到了一個簡單的解決方案。我通過意向啓動谷歌地圖應用
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse("http://maps.google.com/maps?q=" + serviceActivity.Latitude.toString() + "," + serviceActivity.Longitude.toString()));
startActivity(intent);
+0
非常簡單和完美..謝謝你+1 – Noman
2
1
如果要動畫到一個特定的點,你需要一個谷歌地圖上定義一個MapView。然後創建一個MapController和動畫到特定的GeoPoint:
MapController mapController = mapView.getController();
double lat = latitude * 1e6;
double lon = longitude * 1e6;
GeoPoint startpoint = new GeoPoint((int) lat, (int) lon);
mapController.animateTo(startpoint);
試試這個教程:MapView Tutorial
相關問題
- 1. 在Google地圖上查找位置
- 2. 在Google地圖上查找標記的座標
- 3. 顯示位置使用經度/緯度座標 - Google地圖
- 4. 查找使用座標地址或位置
- 5. 設置Google地圖面板的座標
- 6. 如何使用Google地圖查找沿路線的位置?
- 7. 如何在Google Android的圖片上設置地理座標?
- 8. 在緩衝圖像上查找座標
- 9. 從Google地圖中檢索位置座標R
- 10. 如何使用Web服務在地圖上查找位置?
- 11. 查找座標 - 在Google地圖上顯示帶有名稱的信息窗口
- 12. 在圖像[OpenCV/Python]中查找[x,y]旋轉座標位置
- 13. 使用Google地理定位API查找塔的位置
- 14. 基於座標顯示在地圖上的位置android
- 15. 在Google地圖上啓用拖放的準確標記位置
- 16. Google標識在iOS應用程序的地圖上的位置
- 17. 在RichTextBox中查找鼠標光標位置的座標
- 18. 不在Google地圖上顯示位置
- 19. 在Google地圖上更新位置 - API
- 20. 使用位置座標值
- 21. 使用郵政編碼,城市或座標查找位置
- 22. 使用位置查找手勢觸摸的座標觸摸
- 23. 在Google地圖上給定座標集附近的繪圖座標
- 24. Google地理位置給出了無效地址的座標
- 25. Angular 2+ Google Maps從地圖上的點擊位置獲取座標以更新標記位置
- 26. 如何查找Google地圖上特定點和線之間的最近座標?
- 27. 無法在Google地圖中動態查找位置
- 28. Google地圖在KML中的座標
- 29. 哪個座標與使用來自Google地圖的座標的mongodb地理查詢配合使用?
- 30. 如何知道在Google地圖上選定標記的座標
你是什麼意思找到位置?你想動畫到某個位置? – Carnal
在谷歌地圖上查找「32.297581,-64.775734」 – PKeidel
想要了解該位置的地址名稱或地點? – Lokesh