Rename ol.format.JSON to ol.format.JSONFeature

This commit is contained in:
Tom Payne
2014-02-28 13:09:14 +01:00
parent 8ad4b292b7
commit 87cf424029
3 changed files with 25 additions and 25 deletions
+3 -3
View File
@@ -7,7 +7,7 @@ goog.require('goog.array');
goog.require('goog.asserts'); goog.require('goog.asserts');
goog.require('goog.object'); goog.require('goog.object');
goog.require('ol.Feature'); goog.require('ol.Feature');
goog.require('ol.format.JSON'); goog.require('ol.format.JSONFeature');
goog.require('ol.geom.GeometryCollection'); goog.require('ol.geom.GeometryCollection');
goog.require('ol.geom.GeometryType'); goog.require('ol.geom.GeometryType');
goog.require('ol.geom.LineString'); goog.require('ol.geom.LineString');
@@ -22,7 +22,7 @@ goog.require('ol.proj');
/** /**
* @constructor * @constructor
* @extends {ol.format.JSON} * @extends {ol.format.JSONFeature}
* @param {olx.format.GeoJSONOptions=} opt_options Options. * @param {olx.format.GeoJSONOptions=} opt_options Options.
* @todo stability experimental * @todo stability experimental
*/ */
@@ -40,7 +40,7 @@ ol.format.GeoJSON = function(opt_options) {
options.defaultProjection : 'EPSG:4326'); options.defaultProjection : 'EPSG:4326');
}; };
goog.inherits(ol.format.GeoJSON, ol.format.JSON); goog.inherits(ol.format.GeoJSON, ol.format.JSONFeature);
/** /**
@@ -1,4 +1,4 @@
goog.provide('ol.format.JSON'); goog.provide('ol.format.JSONFeature');
goog.require('goog.asserts'); goog.require('goog.asserts');
goog.require('goog.json'); goog.require('goog.json');
@@ -11,10 +11,10 @@ goog.require('ol.format.FormatType');
* @constructor * @constructor
* @extends {ol.format.Feature} * @extends {ol.format.Feature}
*/ */
ol.format.JSON = function() { ol.format.JSONFeature = function() {
goog.base(this); goog.base(this);
}; };
goog.inherits(ol.format.JSON, ol.format.Feature); goog.inherits(ol.format.JSONFeature, ol.format.Feature);
/** /**
@@ -22,7 +22,7 @@ goog.inherits(ol.format.JSON, ol.format.Feature);
* @private * @private
* @return {Object} Object. * @return {Object} Object.
*/ */
ol.format.JSON.prototype.getObject_ = function(source) { ol.format.JSONFeature.prototype.getObject_ = function(source) {
if (goog.isObject(source)) { if (goog.isObject(source)) {
return source; return source;
} else if (goog.isString(source)) { } else if (goog.isString(source)) {
@@ -38,7 +38,7 @@ ol.format.JSON.prototype.getObject_ = function(source) {
/** /**
* @inheritDoc * @inheritDoc
*/ */
ol.format.JSON.prototype.getType = function() { ol.format.JSONFeature.prototype.getType = function() {
return ol.format.FormatType.JSON; return ol.format.FormatType.JSON;
}; };
@@ -46,7 +46,7 @@ ol.format.JSON.prototype.getType = function() {
/** /**
* @inheritDoc * @inheritDoc
*/ */
ol.format.JSON.prototype.readFeature = function(source) { ol.format.JSONFeature.prototype.readFeature = function(source) {
return this.readFeatureFromObject(this.getObject_(source)); return this.readFeatureFromObject(this.getObject_(source));
}; };
@@ -54,7 +54,7 @@ ol.format.JSON.prototype.readFeature = function(source) {
/** /**
* @inheritDoc * @inheritDoc
*/ */
ol.format.JSON.prototype.readFeatures = function(source) { ol.format.JSONFeature.prototype.readFeatures = function(source) {
return this.readFeaturesFromObject(this.getObject_(source)); return this.readFeaturesFromObject(this.getObject_(source));
}; };
@@ -64,7 +64,7 @@ ol.format.JSON.prototype.readFeatures = function(source) {
* @protected * @protected
* @return {ol.Feature} Feature. * @return {ol.Feature} Feature.
*/ */
ol.format.JSON.prototype.readFeatureFromObject = goog.abstractMethod; ol.format.JSONFeature.prototype.readFeatureFromObject = goog.abstractMethod;
/** /**
@@ -72,13 +72,13 @@ ol.format.JSON.prototype.readFeatureFromObject = goog.abstractMethod;
* @protected * @protected
* @return {Array.<ol.Feature>} Features. * @return {Array.<ol.Feature>} Features.
*/ */
ol.format.JSON.prototype.readFeaturesFromObject = goog.abstractMethod; ol.format.JSONFeature.prototype.readFeaturesFromObject = goog.abstractMethod;
/** /**
* @inheritDoc * @inheritDoc
*/ */
ol.format.JSON.prototype.readGeometry = function(source) { ol.format.JSONFeature.prototype.readGeometry = function(source) {
return this.readGeometryFromObject(this.getObject_(source)); return this.readGeometryFromObject(this.getObject_(source));
}; };
@@ -88,13 +88,13 @@ ol.format.JSON.prototype.readGeometry = function(source) {
* @protected * @protected
* @return {ol.geom.Geometry} Geometry. * @return {ol.geom.Geometry} Geometry.
*/ */
ol.format.JSON.prototype.readGeometryFromObject = goog.abstractMethod; ol.format.JSONFeature.prototype.readGeometryFromObject = goog.abstractMethod;
/** /**
* @inheritDoc * @inheritDoc
*/ */
ol.format.JSON.prototype.readProjection = function(source) { ol.format.JSONFeature.prototype.readProjection = function(source) {
return this.readProjectionFromObject(this.getObject_(source)); return this.readProjectionFromObject(this.getObject_(source));
}; };
@@ -104,13 +104,13 @@ ol.format.JSON.prototype.readProjection = function(source) {
* @protected * @protected
* @return {ol.proj.Projection} Projection. * @return {ol.proj.Projection} Projection.
*/ */
ol.format.JSON.prototype.readProjectionFromObject = goog.abstractMethod; ol.format.JSONFeature.prototype.readProjectionFromObject = goog.abstractMethod;
/** /**
* @inheritDoc * @inheritDoc
*/ */
ol.format.JSON.prototype.writeFeature = function(feature) { ol.format.JSONFeature.prototype.writeFeature = function(feature) {
return this.writeFeatureObject(feature); return this.writeFeatureObject(feature);
}; };
@@ -120,13 +120,13 @@ ol.format.JSON.prototype.writeFeature = function(feature) {
* @protected * @protected
* @return {Object} Object. * @return {Object} Object.
*/ */
ol.format.JSON.prototype.writeFeatureObject = goog.abstractMethod; ol.format.JSONFeature.prototype.writeFeatureObject = goog.abstractMethod;
/** /**
* @inheritDoc * @inheritDoc
*/ */
ol.format.JSON.prototype.writeFeatures = function(features) { ol.format.JSONFeature.prototype.writeFeatures = function(features) {
return this.writeFeaturesObject(features); return this.writeFeaturesObject(features);
}; };
@@ -136,13 +136,13 @@ ol.format.JSON.prototype.writeFeatures = function(features) {
* @protected * @protected
* @return {Object} Object. * @return {Object} Object.
*/ */
ol.format.JSON.prototype.writeFeaturesObject = goog.abstractMethod; ol.format.JSONFeature.prototype.writeFeaturesObject = goog.abstractMethod;
/** /**
* @inheritDoc * @inheritDoc
*/ */
ol.format.JSON.prototype.writeGeometry = function(geometry) { ol.format.JSONFeature.prototype.writeGeometry = function(geometry) {
return this.writeGeometryObject(geometry); return this.writeGeometryObject(geometry);
}; };
@@ -152,4 +152,4 @@ ol.format.JSON.prototype.writeGeometry = function(geometry) {
* @protected * @protected
* @return {Object} Object. * @return {Object} Object.
*/ */
ol.format.JSON.prototype.writeGeometryObject = goog.abstractMethod; ol.format.JSONFeature.prototype.writeGeometryObject = goog.abstractMethod;
+3 -3
View File
@@ -4,7 +4,7 @@ goog.require('goog.array');
goog.require('goog.asserts'); goog.require('goog.asserts');
goog.require('goog.object'); goog.require('goog.object');
goog.require('ol.Feature'); goog.require('ol.Feature');
goog.require('ol.format.JSON'); goog.require('ol.format.JSONFeature');
goog.require('ol.geom.LineString'); goog.require('ol.geom.LineString');
goog.require('ol.geom.MultiLineString'); goog.require('ol.geom.MultiLineString');
goog.require('ol.geom.MultiPoint'); goog.require('ol.geom.MultiPoint');
@@ -17,7 +17,7 @@ goog.require('ol.proj');
/** /**
* @constructor * @constructor
* @extends {ol.format.JSON} * @extends {ol.format.JSONFeature}
* @param {olx.format.TopoJSONOptions=} opt_options Options. * @param {olx.format.TopoJSONOptions=} opt_options Options.
* @todo stability experimental * @todo stability experimental
*/ */
@@ -35,7 +35,7 @@ ol.format.TopoJSON = function(opt_options) {
ol.proj.get(options.defaultProjection || 'EPSG:4326'); ol.proj.get(options.defaultProjection || 'EPSG:4326');
}; };
goog.inherits(ol.format.TopoJSON, ol.format.JSON); goog.inherits(ol.format.TopoJSON, ol.format.JSONFeature);
/** /**