@@ -12,7 +12,6 @@ goog.require('goog.net.XhrIo.ResponseType');
|
||||
goog.require('goog.userAgent');
|
||||
goog.require('ol.format.FormatType');
|
||||
goog.require('ol.has');
|
||||
goog.require('ol.proj');
|
||||
goog.require('ol.source.State');
|
||||
goog.require('ol.source.Vector');
|
||||
goog.require('ol.xml');
|
||||
@@ -119,21 +118,6 @@ ol.source.FormatVector.prototype.loadFeaturesFromURL =
|
||||
*/
|
||||
ol.source.FormatVector.prototype.readFeatures = function(source) {
|
||||
var format = this.format;
|
||||
var features = format.readFeatures(source);
|
||||
var featureProjection = format.readProjection(source);
|
||||
var projection = this.getProjection();
|
||||
if (!goog.isNull(projection) && !goog.isNull(featureProjection)) {
|
||||
if (!ol.proj.equivalent(featureProjection, projection)) {
|
||||
var transform = ol.proj.getTransform(featureProjection, projection);
|
||||
var i, ii;
|
||||
for (i = 0, ii = features.length; i < ii; ++i) {
|
||||
var feature = features[i];
|
||||
var geometry = feature.getGeometry();
|
||||
if (goog.isDefAndNotNull(geometry)) {
|
||||
geometry.applyTransform(transform);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return features;
|
||||
return format.readFeatures(source, {featureProjection: projection});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user