fix up build
This commit is contained in:
committed by
ahocevar
parent
0168c2e46f
commit
7b31ec26ea
@@ -47,6 +47,7 @@ ol.parser.GPX = function(opt_options) {
|
||||
'gpx': function(node, obj) {
|
||||
if (!goog.isDef(obj.features)) {
|
||||
obj.features = [];
|
||||
obj.metadata = {projection: ol.proj.get('EPSG:4326')};
|
||||
}
|
||||
this.readChildNodes(node, obj);
|
||||
},
|
||||
@@ -233,17 +234,9 @@ ol.parser.GPX = function(opt_options) {
|
||||
goog.inherits(ol.parser.GPX, ol.parser.XML);
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.parser.GPX.prototype.getProjection = function() {
|
||||
return ol.proj.get('EPSG:4326');
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string|Document|Element|Object} data Data to read.
|
||||
* @return {Object} An object representing the document.
|
||||
* @return {ol.parser.ReadFeaturesResult} An object representing the document.
|
||||
*/
|
||||
ol.parser.GPX.prototype.read = function(data) {
|
||||
if (goog.isString(data)) {
|
||||
@@ -252,7 +245,7 @@ ol.parser.GPX.prototype.read = function(data) {
|
||||
if (data && data.nodeType == 9) {
|
||||
data = data.documentElement;
|
||||
}
|
||||
var obj = {};
|
||||
var obj = {features: [], metadata: {projection: ol.proj.get('EPSG:4326')}};
|
||||
this.readNode(data, obj);
|
||||
return obj;
|
||||
};
|
||||
@@ -262,12 +255,12 @@ ol.parser.GPX.prototype.read = function(data) {
|
||||
* Parse a GPX document provided as a string.
|
||||
* @param {string} str GPX document.
|
||||
* @param {ol.parser.ReadFeaturesOptions=} opt_options Reader options.
|
||||
* @return {Array.<ol.Feature>} Array of features.
|
||||
* @return {ol.parser.ReadFeaturesResult} Features and metadata.
|
||||
*/
|
||||
ol.parser.GPX.prototype.readFeaturesFromString =
|
||||
ol.parser.GPX.prototype.readFeaturesWithMetadataFromString =
|
||||
function(str, opt_options) {
|
||||
this.readFeaturesOptions_ = opt_options;
|
||||
return this.read(str).features;
|
||||
return this.read(str);
|
||||
};
|
||||
|
||||
|
||||
@@ -275,24 +268,24 @@ ol.parser.GPX.prototype.readFeaturesFromString =
|
||||
* Parse a GPX document provided as a DOM structure.
|
||||
* @param {Element|Document} node Document or element node.
|
||||
* @param {ol.parser.ReadFeaturesOptions=} opt_options Feature reading options.
|
||||
* @return {Array.<ol.Feature>} Array of features.
|
||||
* @return {ol.parser.ReadFeaturesResult} Features and metadata.
|
||||
*/
|
||||
ol.parser.GPX.prototype.readFeaturesFromNode =
|
||||
ol.parser.GPX.prototype.readFeaturesWithMetadataFromNode =
|
||||
function(node, opt_options) {
|
||||
this.readFeaturesOptions_ = opt_options;
|
||||
return this.read(node).features;
|
||||
return this.read(node);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {Object} obj Object representing features.
|
||||
* @param {ol.parser.ReadFeaturesOptions=} opt_options Feature reading options.
|
||||
* @return {Array.<ol.Feature>} Array of features.
|
||||
* @return {ol.parser.ReadFeaturesResult} Features and metadata.
|
||||
*/
|
||||
ol.parser.GPX.prototype.readFeaturesFromObject =
|
||||
ol.parser.GPX.prototype.readFeaturesWithMetadataFromObject =
|
||||
function(obj, opt_options) {
|
||||
this.readFeaturesOptions_ = opt_options;
|
||||
return this.read(obj).features;
|
||||
return this.read(obj);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user