From 3c85c32cc5dae467fc7edf541f69a7d05cba37e0 Mon Sep 17 00:00:00 2001 From: Paul Spencer Date: Tue, 11 Mar 2014 20:24:20 -0400 Subject: [PATCH] Add documentation for the GPX format. --- src/ol/format/gpxformat.exports | 2 ++ src/ol/format/gpxformat.js | 39 +++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/src/ol/format/gpxformat.exports b/src/ol/format/gpxformat.exports index 82582fd4ac..ac072e55dd 100644 --- a/src/ol/format/gpxformat.exports +++ b/src/ol/format/gpxformat.exports @@ -1,3 +1,5 @@ @exportSymbol ol.format.GPX @exportProperty ol.format.GPX.prototype.readFeature @exportProperty ol.format.GPX.prototype.readFeatures +@exportProperty ol.format.GPX.prototype.readProjection +@exportProperty ol.format.GPX.prototype.writeFeatures diff --git a/src/ol/format/gpxformat.js b/src/ol/format/gpxformat.js index 9217c15719..8dbe7cdba8 100644 --- a/src/ol/format/gpxformat.js +++ b/src/ol/format/gpxformat.js @@ -363,6 +363,16 @@ ol.format.GPX.WPT_PARSERS_ = ol.xml.makeParsersNS( }); +/** + * Read the first feature from a GPX source. + * + * @function + * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @return {ol.Feature} Feature. + */ +ol.format.GPX.prototype.readFeature; + + /** * @inheritDoc */ @@ -384,6 +394,16 @@ ol.format.GPX.prototype.readFeatureFromNode = function(node) { }; +/** + * Read all features from a GPX source. + * + * @function + * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @return {Array.} Features. + */ +ol.format.GPX.prototype.readFeatures; + + /** * @inheritDoc */ @@ -407,6 +427,15 @@ ol.format.GPX.prototype.readFeaturesFromNode = function(node) { }; +/** + * Read the projection from a GPX source. + * + * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @return {ol.proj.Projection} Projection. + */ +ol.format.GPX.prototype.readProjection; + + /** * @inheritDoc */ @@ -770,6 +799,16 @@ ol.format.GPX.V1_1 = function() { goog.inherits(ol.format.GPX.V1_1, ol.format.GPX); +/** + * Encode an array of features in the GPX format. + * + * @function + * @param {Array.} features Features. + * @return {ArrayBuffer|Node|Object|string} Result. + */ +ol.format.GPX.prototype.writeFeatures; + + /** * @inheritDoc */