2010-02-09 35 views
5

我無法在DDMS eclipse插件中加載GPX文件。指定GPX文件時,不會將點添加到模擬器控制列表中。我也嘗試添加KML文件,並在Google地球中生成。DDMS插件不加載GPX文件

有沒有辦法讓這些文件起作用?使用WTK 2.5.2

<?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.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> 
+0

篩選更容易我在的情況下也有類似的問題... 它有助於重新啓動仿真 – poeschlorn 2010-05-11 11:13:20

回答

1

並使用該數據在模擬器中保存爲gps.xml:該文件的內容如下

<![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>]]> 
4

我只是用的負荷試了一下我的自己的GPX文件,什麼都沒有發生。然後我嘗試了一個tramper example,它工作。

它看起來像文件開頭的<?xml version="1.0" encoding="UTF-8" standalone="no" ?>需要在它後面有一個換行符。很多GPX文件只是直接進入第一行的<gpx...標籤。

在那裏添加一個換行符讓DDMS有點快樂地加載文件。

1

正如我評論here似乎DDMS只支持1.1 GPX文件。根標籤更改不同版本的相關屬性使用1.1應該有所幫助:

<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">