1

问题是,当我在开发 android 应用程序时尝试加载 GPX 文件并通过“加载 GPX”加载文件时,我推送它,然后选择正确的文件后没有任何反应。问题可能出在哪里?在此处输入图像描述

示例文件:

<?xml version="1.0" encoding="UTF-8"?>
<gpx
  version="1.0"
  creator="GPSBabel - http://www.gpsbabel.org"
  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">
<time>2013-10-27T21:12:32Z</time>
<bounds minlat="54.347790000" minlon="18.519200000" maxlat="54.382660000" maxlon="18.644040000"/>
<trk>
  <name>05.05.2013</name>
<trkseg>
<trkpt lat="54.349850000" lon="18.627770000">
  <ele>23.000000</ele>
</trkpt>
</trkseg>
</trk>
</gpx>

第二:

<?xml version="1.0"?>
<gpx
 version="1.0"
 creator="ExpertGPS 1.1 - http://www.topografix.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">
<time>2002-02-27T17:18:33Z</time>
<bounds minlat="42.401051" minlon="-71.126602" maxlat="42.468655" maxlon="-71.102973"/>
<wpt lat="42.438878" lon="-71.119277">
 <ele>44.586548</ele>
 <time>2001-11-28T21:05:28Z</time>
 <name>5066</name>
 <desc><![CDATA[5066]]></desc>
 <sym>Crossing</sym>
 <type><![CDATA[Crossing]]></type>
</wpt>

第三

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<gpx
 version="1.0"
 creator="ExpertGPS 1.1.1 - http://www.topografix.com"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns="http://www.topografix.com/GPX/1/0"
 xmlns:topografix="http://www.topografix.com/GPX/Private/TopoGrafix/0/1"
 xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd http://www.topografix.com/GPX/Private/TopoGrafix/0/1 http://www.topografix.com/GPX/Private/TopoGrafix/0/1/topografix.xsd">
  <number numpoints="23" numwpts="2"></number>
  <wpt lat="35952967" lon="-83929158" description="Construction"></wpt>
  <wpt lat="35955038" lon="-83929126" description="Heavy traffic"></wpt>
  <trk>
    <trkseg>
        <trkpt lat="35956445" lon="-83925379" grade="1"></trkpt>
        <trkpt lat="35956567" lon="-83925450" grade="1"></trkpt>
    </trkseg>
  </trk>
</gpx>
4

1 回答 1

1

解决方案是使用新的 gpx 版本<gpx version="1.1" >,我发现这是唯一一个可以工作的。

于 2013-10-28T15:16:08.087 回答