我的应用需要显示从A到B的Google地图路线,但我不想将Google地图放入我的应用程序 - 相反,我想使用Intent启动它.这可能吗?如果有,怎么样?
我可以解析kml文件以显示Android中的路径或点吗?请你能帮助我吗?
这是kml示例代码,我想在android谷歌地图中显示:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>Paths</name>
<description>Examples of paths. Note that the tessellate tag is by default
set to 0. If you want to create tessellated lines, they must be authored
(or edited) directly in KML.</description>
<Style id="yellowLineGreenPoly">
<LineStyle>
<color>7f00ffff</color>
<width>4</width>
</LineStyle>
<PolyStyle>
<color>7f00ff00</color>
</PolyStyle>
</Style>
<Placemark>
<name>Absolute Extruded</name>
<description>Transparent green wall with yellow outlines</description>
<styleUrl>#yellowLineGreenPoly</styleUrl>
<LineString>
<extrude>1</extrude>
<tessellate>1</tessellate>
<altitudeMode>absolute</altitudeMode>
<coordinates> -112.2550785337791,36.07954952145647,2357
-112.2549277039738,36.08117083492122,2357
-112.2552505069063,36.08260761307279,2357
-112.2564540158376,36.08395660588506,2357
-112.2580238976449,36.08511401044813,2357
-112.2595218489022,36.08584355239394,2357
-112.2608216347552,36.08612634548589,2357
-112.262073428656,36.08626019085147,2357
-112.2633204928495,36.08621519860091,2357
-112.2644963846444,36.08627897945274,2357
-112.2656969554589,36.08649599090644,2357
</coordinates>
<LineString>
</Placemark>
</Document>
</kml> …Run Code Online (Sandbox Code Playgroud) 我已将KML文件加载到Android设备上.将KML文件的叠加层加载到Google地图的最简单机制是什么?我不想将KML文件上传到网络,而是宁愿在本地打开它.
Android中是否有办法将Google地球中的KML文件加载到地图窗口小部件中?
具体来说,我希望尽可能轻松地将在Google地球中创建的已保存形状加载到地图小部件之上.以前有人试过这个吗?
我的 Flutter(Android 和 iOS)应用程序生成 KML 或 GPX 文件,它按预期工作。
现在我想添加一个按钮“打开文件”,它应该打开这样一个系统对话框,其中列出了已安装的地图或其他消费应用程序(可以处理此类格式)以供选择。
如何打开此对话框?如何找到与格式相关的应用程序以及如何将文件发送到这些应用程序。我想,有一个插件,但找不到。它必须在 Android 和 iOS 上运行,很高兴有网络支持。
我刚看到open_file但我不太确定它是否按预期工作,因为它没有列出对 KML/GPX 的支持。
提前致谢!