Implementing getProjection for KML and GPX

This commit is contained in:
ahocevar
2013-07-22 15:02:43 +02:00
parent 55697dea28
commit b0c1ef04a1
2 changed files with 18 additions and 0 deletions

View File

@@ -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.

View File

@@ -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