Read/write GPX parser. Create a new instance with the OpenLayers.Format.GPX constructor.
OpenLayers.
|
Read/write GPX parser. |
Properties | |
defaultDesc | {String} Default description for the waypoints/tracks in the case where the feature has no “description” attribute. |
extractWaypoints | {Boolean} Extract waypoints from GPX. |
extractTracks | {Boolean} Extract tracks from GPX. |
extractRoutes | {Boolean} Extract routes from GPX. |
extractAttributes | {Boolean} Extract feature attributes from GPX. |
creator | {String} The creator attribute to be added to the written GPX files. |
Constructor | |
OpenLayers.
|
Create a new parser for GPX. |
Functions | |
read | Return a list of features from a GPX doc |
write | Accepts Feature Collection, and returns a string. |
read: function( doc )
Return a list of features from a GPX doc
doc | {Element} |
Array({OpenLayers.Feature.Vector})
write: function( features, metadata )
Accepts Feature Collection, and returns a string.
features | {Array(OpenLayers.Feature.Vector)} List of features to serialize into a string. |
metadata | {Object} A key/value pairs object to build a metadata node to add to the gpx. Supported keys are ‘name’, ‘desc’, ‘author’. |
Return a list of features from a GPX doc
read: function( doc )
Accepts Feature Collection, and returns a string.
write: function( features, metadata )