我需要使用已存在于SD卡上的kml文件打开谷歌地图。 (/sdcard/example.kml)Android - 如何使用Intent和KML打开谷歌地图?
我想:
这个答案是错的,当点击链接,地图打开,但搜索位置“文件: ///sdcard/example.kml”
- 使用意图:
此代码抛出ActivityNotFoundException
:
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse("file:///sdcard/example.kml"));
startActivity(intent);
- 我试图使用setDataAndType方法,但是,这不是工作:
另一个ActivityNotFoundException
:
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(
Uri.parse("file:///sdcard/example.kml"),
"application/kml");
startActivity(intent);
- 另外两个未解的话题这个问题:
Open local KML File in Google Maps on Android
Does the Android API support KML files?
不知道如何打开这个KML?
谢谢!!!
什么是关于http://stackoverflow.com/questions/3109158/how-to-draw-a-path-on-a-map-using-kml-file/3109723#3109723 –