Implement read/write transforms for ol.format.KML

This commit is contained in:
tsauerwein
2014-08-08 16:40:46 +02:00
parent 31dbbc6a8c
commit b05f880f7c
6 changed files with 163 additions and 17 deletions
+21
View File
@@ -277,3 +277,24 @@ ol.format.XMLFeature.transformFeaturesWithOptions = function(
}
return features;
};
/**
* @param {(olx.format.WriteOptions|olx.format.ReadOptions)=} opt_options
* Options.
* @param {ol.proj.ProjectionLike} defaultDataProjection Default projection.
* @protected
* @return {(olx.format.WriteOptions|olx.format.ReadOptions)=} Updated options.
*/
ol.format.XMLFeature.setDefaultDataProjection = function(
opt_options, defaultDataProjection) {
if (goog.isDef(opt_options)) {
if (!goog.isDef(opt_options.dataProjection)) {
opt_options = {
featureProjection: opt_options.featureProjection,
dataProjection: defaultDataProjection
};
}
}
return opt_options;
};