Add write transform capability to ol.format.JSONFeature

This commit is contained in:
Andreas Hocevar
2014-07-18 20:50:04 +02:00
parent b0d95b326a
commit 8aa799850d
+11 -6
View File
@@ -124,13 +124,14 @@ ol.format.JSONFeature.prototype.readProjectionFromObject = goog.abstractMethod;
/** /**
* @inheritDoc * @inheritDoc
*/ */
ol.format.JSONFeature.prototype.writeFeature = function(feature) { ol.format.JSONFeature.prototype.writeFeature = function(feature, opt_options) {
return this.writeFeatureObject(feature); return this.writeFeatureObject(feature, opt_options);
}; };
/** /**
* @param {ol.Feature} feature Feature. * @param {ol.Feature} feature Feature.
* @param {olx.format.WriteOptions=} opt_options Write options.
* @protected * @protected
* @return {Object} Object. * @return {Object} Object.
*/ */
@@ -140,13 +141,15 @@ ol.format.JSONFeature.prototype.writeFeatureObject = goog.abstractMethod;
/** /**
* @inheritDoc * @inheritDoc
*/ */
ol.format.JSONFeature.prototype.writeFeatures = function(features) { ol.format.JSONFeature.prototype.writeFeatures = function(
return this.writeFeaturesObject(features); features, opt_options) {
return this.writeFeaturesObject(features, opt_options);
}; };
/** /**
* @param {Array.<ol.Feature>} features Features. * @param {Array.<ol.Feature>} features Features.
* @param {olx.format.WriteOptions=} opt_options Write options.
* @protected * @protected
* @return {Object} Object. * @return {Object} Object.
*/ */
@@ -156,13 +159,15 @@ ol.format.JSONFeature.prototype.writeFeaturesObject = goog.abstractMethod;
/** /**
* @inheritDoc * @inheritDoc
*/ */
ol.format.JSONFeature.prototype.writeGeometry = function(geometry) { ol.format.JSONFeature.prototype.writeGeometry = function(
return this.writeGeometryObject(geometry); geometry, opt_options) {
return this.writeGeometryObject(geometry, opt_options);
}; };
/** /**
* @param {ol.geom.Geometry} geometry Geometry. * @param {ol.geom.Geometry} geometry Geometry.
* @param {olx.format.WriteOptions=} opt_options Write options.
* @protected * @protected
* @return {Object} Object. * @return {Object} Object.
*/ */