Implementing getProjection for KML and GPX
This commit is contained in:
@@ -12,6 +12,7 @@ goog.require('ol.parser.ObjectFeatureParser');
|
||||
goog.require('ol.parser.ReadFeaturesOptions');
|
||||
goog.require('ol.parser.StringFeatureParser');
|
||||
goog.require('ol.parser.XML');
|
||||
goog.require('ol.proj');
|
||||
|
||||
|
||||
|
||||
@@ -232,6 +233,14 @@ 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.
|
||||
|
||||
@@ -27,6 +27,7 @@ goog.require('ol.parser.DomFeatureParser');
|
||||
goog.require('ol.parser.ReadFeaturesOptions');
|
||||
goog.require('ol.parser.StringFeatureParser');
|
||||
goog.require('ol.parser.XML');
|
||||
goog.require('ol.proj');
|
||||
goog.require('ol.style.Icon');
|
||||
goog.require('ol.style.Line');
|
||||
goog.require('ol.style.LineLiteral');
|
||||
@@ -928,6 +929,14 @@ ol.parser.KML.prototype.parseLinks = function(deferreds, obj, done) {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.parser.KML.prototype.getProjection = function() {
|
||||
return ol.proj.get('EPSG:4326');
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string|Document|Element|Object} data Data to read.
|
||||
* @param {Function=} opt_callback Optional callback to call when reading
|
||||
|
||||
Reference in New Issue
Block a user