DDMS不会加载(或不解析?)KML文件

Nei*_*eil 4 android kml ddms

我无法让DDMS加载任何KML文件.

我有一个KML文件,例如其中包含以下内容:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
 <Placemark>
   <name>Simple placemark</name>
   <description>Attached to the ground. Intelligently places itself
      at the height of the underlying terrain.</description>
   <Point>
     <coordinates>-122.0822035425683,37.42228990140251,0</coordinates>
   </Point>
 </Placemark>
</kml>
Run Code Online (Sandbox Code Playgroud)

http://developer.android.com/guide/developing/tools/ddms.html上的文档 似乎表明我只需要启动我的应用程序并启动DDMS并加载KML.这不起作用.

我甚至尝试过在同一个链接上建议的Google Earth解决方案.

我正在使用SDK 1.5_r2.我做错了什么或遗失了什么?

小智 9

对于那些来自谷歌的人来说,这是我发现的唯一在线KML转换工具,它会将常规KML文件转换为DDMS将解析的文件:

http://lab.soledadpenades.com/android/kml/


小智 5

有一些怪癖:

  1. 您必须将名称空间指定为:

    <kml xmlns="http://earth.google.com/kml/2.x">

  2. "地标"元素必须以大写字母开头.

  3. "coordinates"和"name"元素必须位于"Placemark"元素内,并以小写字母开头.

您的示例只需要不同的命名空间.