[OpenLayers-Users] Re: problems using GPX format
Georg Kaspar
georg at muenster.de
Mon Apr 4 09:43:44 EDT 2011
further investigations lead to the conclusion that a link tag without
further content or child nodes is causing the problem. For example:
<trk>
<name>BaumbergeAlpin-97km on GPSies.com</name>
<link href="http://www.gpsies.com/map.do?fileId=ufgjkujlrxmxgyun" />
<trkseg>
by removing the link tag or adding some content, the problem could be
solved... anybody who can explain this behaviour?
best regards,
georg
Am 04.04.2011 14:12, schrieb Georg Kaspar:
> i just found out that everything works fine using gpx v1.0 files. the
> problem only occures with v1.1. is this a known problem? didn't find
> anything related on the web...
>
> Am 04.04.2011 12:15, schrieb Georg Kaspar:
>> Hi,
>>
>> I'm having problems including GPX track data into my application. The
>> source:
>>
>> tmp_layer = new OpenLayers.Layer.Vector(o.result.name, {
>> protocol: new OpenLayers.Protocol.HTTP({
>> url: o.result.path,
>> format: new OpenLayers.Format.GPX
>> }),
>> strategies: [new OpenLayers.Strategy.Fixed()],
>> styleMap: style,
>> projection: new OpenLayers.Projection("EPSG:4326")
>> });
>>
>> leads to the following trace:
>>
>> Uncaught TypeError: Cannot read property 'nodeType' of null
>> OpenLayers.js:1928
>> OpenLayers.Format.GPX.OpenLayers.Class.parseAttributesOpenLayers.js:1928
>> OpenLayers.Format.GPX.OpenLayers.Class.readOpenLayers.js:1920
>> OpenLayers.Protocol.HTTP.OpenLayers.Class.parseFeaturesOpenLayers.js:1801
>> OpenLayers.Protocol.HTTP.OpenLayers.Class.handleResponseOpenLayers.js:1797
>> OpenLayers.Protocol.HTTP.OpenLayers.Class.handleReadOpenLayers.js:1792
>> (anonymous function)OpenLayers.js:301
>> (anonymous function)OpenLayers.js:113
>> OpenLayers.Request.runCallbacksOpenLayers.js:922
>> request.onreadystatechangeOpenLayers.js:919
>> cXMLHttpRequest.dispatchEventOpenLayers.js:1198
>> fReadyStateChangeOpenLayers.js:1201
>> cXMLHttpRequest.open._object.onreadystatechangeOpenLayers.js:1185
>>
>> strange though, the same code works with KML files (using KML format of
>> course)...
>>
>> any help appreciated!
>> thanks & regards,
>> Georg
More information about the Users
mailing list