开发者

DDMS plugin not loading GPX files

I am unable to load a GPX file in the DDMS eclipse plugin. When specifying a GPX file, no points are added to the emulator control list. I have tried adding KML files as well, generated in Google earth.

Is there a way to get these files to work? The content of the file is listed below:

<?xml version="1.0" encoding="UTF-8"?>
<gpx
  version="1.0"
  creator="RunKeeper - http://www.runkeeper.com"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="http://www.topografix.开发者_Go百科com/GPX/1/0"
  xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
<trk>
  <name>Running 11/30/09 3:37 pm11/30/09 3:37 pm</name>
  <time>2009-11-30T15:37:08Z</time>
<trkseg>
<trkpt lat="41.811406000" lon="-72.521427000">
 <ele>37.000000</ele>
 <time>2009-11-30T15:37:08Z</time>
</trkpt>
<trkpt lat="41.811030000" lon="-72.522882000">
 <ele>38.000000</ele>
 <time>2009-11-30T15:37:10Z</time>
</trkpt>


using wtk 2.5.2 and use this data saved as gps.xml in the emulator:

  <![CDATA[<waypoints>
  <waypoint time="1500" latitude="14.389796708964603" longitude="50.09985002736201" altitude="310" />
   <waypoint time="5500" latitude="14.390283327582706" longitude="50.099909292742595" altitude="310" /> 
   <waypoint time="5500" latitude="14.390282428592135" longitude="50.100262519964886" altitude="310" /> 
   <waypoint time="1500" latitude="14.390793552257932" longitude="50.10032395846041" altitude="310" />
  </waypoints>]]>


As I commented here it seems that DDMS only supports 1.1 GPX files. Changing the different version-related attributes on the root tag to use 1.1 should help:

<gpx
  version="1.1"
  creator="RunKeeper - http://www.runkeeper.com"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="http://www.topografix.com/GPX/1/1"
  xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">


Free easy "fixer" for your kml files exported from google earth, also google earth can import GPX and makes editing them a lot easier than sifting through XML

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜