[OpenLayers-Trac] [OpenLayers] #2931: Problems with parsing
GPX-Files
OpenLayers
trac-20090302 at openlayers.org
Mon Nov 15 05:58:06 EST 2010
#2931: Problems with parsing GPX-Files
-----------------------+----------------------------------------------------
Reporter: laberlaib | Owner:
Type: bug | Status: new
Priority: minor | Milestone: 2.11 Release
Component: general | Version: 2.10
Keywords: | State:
-----------------------+----------------------------------------------------
Hello,
when trying to parse some GPX-Files i found out about the following:
If a GPX-file contains a waypoint with an empty <name>-node, the GPX-file
will not be parsed porperly.
I use the following code to create the layers and draw the files:
var gpxLayer = new OpenLayers.Layer.GML("layername", "filename.gpx" , {
format: OpenLayers.Format.GPX,
styleMap: new OpenLayers.StyleMap({
strokeColor: "green", strokeWidth:
4,
strokeDashstyle:
"solid",strokeOpacity: 0.8
}),
projection: new
OpenLayers.Projection("EPSG:4326")
});
map.addLayer(gpxLayer);
I got about 40 routes i want to draw. All the tracks i couldn't draw ended
with
<wpt lat="xx.xx" lon="yy.yy">
<name></name>
</wpt>
After deleting these last lines in the file, everything worked out well.
OS: WinXP;
Browsers: FF 3.6.12 // IE 7;
OL-Version: Link to hosted version
I could not find any solution by searching the web.
laberlaib
PS: it is the first time i use a ticket-based system to report a bug, i
hope i did it right.
--
Ticket URL: <http://trac.openlayers.org/ticket/2931>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list