[OpenLayers-Trac] [OpenLayers] #3129: Error parsing GpsTracker Lite GPX file

OpenLayers trac-20090302 at openlayers.org
Sat Feb 26 10:17:15 EST 2011


#3129: Error parsing GpsTracker Lite GPX file
------------------------------+---------------------------------------------
 Reporter:  sodasmile         |       Owner:  tschaub     
     Type:  bug               |      Status:  new         
 Priority:  minor             |   Milestone:  2.11 Release
Component:  Format            |     Version:  2.10        
 Keywords:  GPS Tracker Lite  |       State:              
------------------------------+---------------------------------------------
 On my android phone, I use the application GPS Tracker Lite,
 http://sites.google.com/site/telekgabor/android/gpst to track trips. The
 application creates a GPX file.

 I'm using OpenLayers to display my various tracks, Garmin GPX files work
 flawlessly, however the GPX files from the android app won't display.

 I traced down where the error happened, and I discovered by the use of
 Opera Dragonfly the following:
 Uncaught exception: TypeError: Cannot convert 'value' to object
 Error thrown at line 169, column 16 in <anonymous function:
 parseAttributes>(node) in
 http://localhost/~asm/gps/js/openlayers/lib/OpenLayers/Format/GPX.js:
     if(value.nodeType == 3 || value.nodeType == 4)

 I changed the line to become:
 if((value != null) && (value.nodeType == 3 || value.nodeType == 4)) {

 and the track displays correctly in both Opera, Safari, Chrome and FireFox
 on Mac, have not been able to test on Windows/Linux yet.

-- 
Ticket URL: <http://trac.openlayers.org/ticket/3129>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list