我正在嘗試從鏈接中讀取地圖(http://maps.google.com/maps/ms?msid=216892338463540803496.000494dd57eb5ebce6db2 & msa = 0)並將其繪製在MapView上,是否有可能?如何在Google地圖上繪製Google地圖上的預建地圖
1
A
回答
3
正如你在我以前的答案發布的詳細信息(」 但我不想解析KML和逐點繪圖,我想知道是否有一種方法可以一次全部繪出「),我現在可以重新編寫我的答案。
你應該嘗試這些線路,並根據需要進行修改:
Intent mapIntent = new Intent(Intent.ACTION_VIEW);
Uri uri1 = Uri.parse("geo:0,0?q=http://code.google.com/apis/kml/
documentation/KML_Samples.kml");
mapIntent.setData(uri1);
startActivity(Intent.createChooser(mapIntent, "Sample"));
不幸的是,你不會有任何控制,因爲這不是一個MapActivity。 如果您打算在地圖上添加更多內容,您必須嘗試我的第一個提議並解析自己的kml!
0
您可以在本教程在地圖上繪製Overlays
0
看:http://codemagician.wordpress.com/2010/05/06/android-google-mapview-tutorial-done-right/
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
MapView mapView = (MapView) findViewById(R.id.mapview);
mapView.setBuiltInZoomControls(true);
List<Overlay> mapOverlays = mapView.getOverlays();
Drawable drawable = this.getResources().getDrawable(R.drawable.icon);
HelloItemizedOverlay itemizedoverlay = new HelloItemizedOverlay(drawable,this);
GeoPoint point = new GeoPoint(30443769,-91158458);
OverlayItem overlayitem = new OverlayItem(point, "Laissez les bon temps rouler!", "I'm in Louisiana!");
GeoPoint point2 = new GeoPoint(17385812,78480667);
OverlayItem overlayitem2 = new OverlayItem(point2, "Namashkaar!", "I'm in Hyderabad, India!");
itemizedoverlay.addOverlay(overlayitem);
itemizedoverlay.addOverlay(overlayitem2);
mapOverlays.add(itemizedoverlay);
}
@Override
protected boolean isRouteDisplayed()
{
return false;
}
}
+0
多個圖像,但我不想分析KML和逐點繪製。我想知道是否有一種方法來一次繪製所有圖案 –
+0
也許你的問題值得超過3行......當你問一個問題時,你應該真的描述你的需求,我們不能猜測你在想什麼;-) –
相關問題
- 1. 如何在android地圖上的google地圖上繪製虛線地圖
- 2. Polyline在Google地圖上沒有繪製
- 3. 在Google地圖上繪製矩形
- 4. 在Google地圖上繪製標記
- 5. 讓用戶在Google地圖上繪製?
- 6. 在Google地圖上繪製路線
- 7. 在Google地圖上繪製文字
- 8. 未在Google地圖上繪製線條
- 9. Android,Google地圖上的繪製路線
- 10. Google地圖上的繪圖方向
- 11. 如何使用Google map api在Google地圖上繪製路線?
- 12. 如何繪製地圖上的數據而不使用Google地圖(圖片)?
- 13. 如何禁止在Google地圖上的地圖上移動?
- 14. Google地圖和地圖上的標記
- 15. 在Google地圖上繪製來自foursquare的場地
- 16. 在Google地圖上通過手指自由地繪圖
- 17. 意圖在Google地圖上發佈帶有地標的地圖
- 18. iOS [iPhone]在Google地圖上繪製2000多個地點
- 19. 動態地繪製Google地球上的圖表
- 20. 如何在移動時在Google地圖上繪製路徑?
- 21. 用Google地圖繪製餅圖片
- 22. 在Google地圖上移動Google地圖標記自動完成
- 23. 在搜索上的Google地圖在地圖上搜索
- 24. 在Google地圖上顯示地區?
- 25. Google地圖如何在DIV上繪製路線?
- 26. 如何在Google地圖上繪製和導航路線
- 27. 如何在Google地圖上繪製鐵路路線?
- 28. 如何在Google地圖上繪製Postgis Shortest_path行?
- 29. 如何在Google地圖上繪製靜態目標圈?
- 30. 如何在Google地圖上繪製線條
但有可能繪製所有地圖點一次,或者我應該分析繪製一個接一個的KML? –
是的,你可以繪製一個覆蓋 –