Rename _ol_format_JSONFeature_ to JSONFeature
This commit is contained in:
@@ -6,7 +6,7 @@ import _ol_Feature_ from '../Feature.js';
|
|||||||
import _ol_asserts_ from '../asserts.js';
|
import _ol_asserts_ from '../asserts.js';
|
||||||
import {containsExtent} from '../extent.js';
|
import {containsExtent} from '../extent.js';
|
||||||
import FeatureFormat from '../format/Feature.js';
|
import FeatureFormat from '../format/Feature.js';
|
||||||
import _ol_format_JSONFeature_ from '../format/JSONFeature.js';
|
import JSONFeature from '../format/JSONFeature.js';
|
||||||
import GeometryLayout from '../geom/GeometryLayout.js';
|
import GeometryLayout from '../geom/GeometryLayout.js';
|
||||||
import GeometryType from '../geom/GeometryType.js';
|
import GeometryType from '../geom/GeometryType.js';
|
||||||
import LineString from '../geom/LineString.js';
|
import LineString from '../geom/LineString.js';
|
||||||
@@ -34,7 +34,7 @@ var EsriJSON = function(opt_options) {
|
|||||||
|
|
||||||
var options = opt_options ? opt_options : {};
|
var options = opt_options ? opt_options : {};
|
||||||
|
|
||||||
_ol_format_JSONFeature_.call(this);
|
JSONFeature.call(this);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Name of the geometry attribute for features.
|
* Name of the geometry attribute for features.
|
||||||
@@ -45,7 +45,7 @@ var EsriJSON = function(opt_options) {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inherits(EsriJSON, _ol_format_JSONFeature_);
|
inherits(EsriJSON, JSONFeature);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {inherits} from '../index.js';
|
|||||||
import _ol_asserts_ from '../asserts.js';
|
import _ol_asserts_ from '../asserts.js';
|
||||||
import _ol_Feature_ from '../Feature.js';
|
import _ol_Feature_ from '../Feature.js';
|
||||||
import FeatureFormat from '../format/Feature.js';
|
import FeatureFormat from '../format/Feature.js';
|
||||||
import _ol_format_JSONFeature_ from '../format/JSONFeature.js';
|
import JSONFeature from '../format/JSONFeature.js';
|
||||||
import GeometryCollection from '../geom/GeometryCollection.js';
|
import GeometryCollection from '../geom/GeometryCollection.js';
|
||||||
import LineString from '../geom/LineString.js';
|
import LineString from '../geom/LineString.js';
|
||||||
import MultiLineString from '../geom/MultiLineString.js';
|
import MultiLineString from '../geom/MultiLineString.js';
|
||||||
@@ -32,7 +32,7 @@ var GeoJSON = function(opt_options) {
|
|||||||
|
|
||||||
var options = opt_options ? opt_options : {};
|
var options = opt_options ? opt_options : {};
|
||||||
|
|
||||||
_ol_format_JSONFeature_.call(this);
|
JSONFeature.call(this);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
@@ -62,7 +62,7 @@ var GeoJSON = function(opt_options) {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inherits(GeoJSON, _ol_format_JSONFeature_);
|
inherits(GeoJSON, JSONFeature);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -15,11 +15,11 @@ import _ol_format_FormatType_ from '../format/FormatType.js';
|
|||||||
* @abstract
|
* @abstract
|
||||||
* @extends {ol.format.Feature}
|
* @extends {ol.format.Feature}
|
||||||
*/
|
*/
|
||||||
var _ol_format_JSONFeature_ = function() {
|
var JSONFeature = function() {
|
||||||
FeatureFormat.call(this);
|
FeatureFormat.call(this);
|
||||||
};
|
};
|
||||||
|
|
||||||
inherits(_ol_format_JSONFeature_, FeatureFormat);
|
inherits(JSONFeature, FeatureFormat);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -27,7 +27,7 @@ inherits(_ol_format_JSONFeature_, FeatureFormat);
|
|||||||
* @private
|
* @private
|
||||||
* @return {Object} Object.
|
* @return {Object} Object.
|
||||||
*/
|
*/
|
||||||
_ol_format_JSONFeature_.prototype.getObject_ = function(source) {
|
JSONFeature.prototype.getObject_ = function(source) {
|
||||||
if (typeof source === 'string') {
|
if (typeof source === 'string') {
|
||||||
var object = JSON.parse(source);
|
var object = JSON.parse(source);
|
||||||
return object ? /** @type {Object} */ (object) : null;
|
return object ? /** @type {Object} */ (object) : null;
|
||||||
@@ -42,7 +42,7 @@ _ol_format_JSONFeature_.prototype.getObject_ = function(source) {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
_ol_format_JSONFeature_.prototype.getType = function() {
|
JSONFeature.prototype.getType = function() {
|
||||||
return _ol_format_FormatType_.JSON;
|
return _ol_format_FormatType_.JSON;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ _ol_format_JSONFeature_.prototype.getType = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
_ol_format_JSONFeature_.prototype.readFeature = function(source, opt_options) {
|
JSONFeature.prototype.readFeature = function(source, opt_options) {
|
||||||
return this.readFeatureFromObject(
|
return this.readFeatureFromObject(
|
||||||
this.getObject_(source), this.getReadOptions(source, opt_options));
|
this.getObject_(source), this.getReadOptions(source, opt_options));
|
||||||
};
|
};
|
||||||
@@ -59,7 +59,7 @@ _ol_format_JSONFeature_.prototype.readFeature = function(source, opt_options) {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
_ol_format_JSONFeature_.prototype.readFeatures = function(source, opt_options) {
|
JSONFeature.prototype.readFeatures = function(source, opt_options) {
|
||||||
return this.readFeaturesFromObject(
|
return this.readFeaturesFromObject(
|
||||||
this.getObject_(source), this.getReadOptions(source, opt_options));
|
this.getObject_(source), this.getReadOptions(source, opt_options));
|
||||||
};
|
};
|
||||||
@@ -72,7 +72,7 @@ _ol_format_JSONFeature_.prototype.readFeatures = function(source, opt_options) {
|
|||||||
* @protected
|
* @protected
|
||||||
* @return {ol.Feature} Feature.
|
* @return {ol.Feature} Feature.
|
||||||
*/
|
*/
|
||||||
_ol_format_JSONFeature_.prototype.readFeatureFromObject = function(object, opt_options) {};
|
JSONFeature.prototype.readFeatureFromObject = function(object, opt_options) {};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -82,13 +82,13 @@ _ol_format_JSONFeature_.prototype.readFeatureFromObject = function(object, opt_o
|
|||||||
* @protected
|
* @protected
|
||||||
* @return {Array.<ol.Feature>} Features.
|
* @return {Array.<ol.Feature>} Features.
|
||||||
*/
|
*/
|
||||||
_ol_format_JSONFeature_.prototype.readFeaturesFromObject = function(object, opt_options) {};
|
JSONFeature.prototype.readFeaturesFromObject = function(object, opt_options) {};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
_ol_format_JSONFeature_.prototype.readGeometry = function(source, opt_options) {
|
JSONFeature.prototype.readGeometry = function(source, opt_options) {
|
||||||
return this.readGeometryFromObject(
|
return this.readGeometryFromObject(
|
||||||
this.getObject_(source), this.getReadOptions(source, opt_options));
|
this.getObject_(source), this.getReadOptions(source, opt_options));
|
||||||
};
|
};
|
||||||
@@ -101,13 +101,13 @@ _ol_format_JSONFeature_.prototype.readGeometry = function(source, opt_options) {
|
|||||||
* @protected
|
* @protected
|
||||||
* @return {ol.geom.Geometry} Geometry.
|
* @return {ol.geom.Geometry} Geometry.
|
||||||
*/
|
*/
|
||||||
_ol_format_JSONFeature_.prototype.readGeometryFromObject = function(object, opt_options) {};
|
JSONFeature.prototype.readGeometryFromObject = function(object, opt_options) {};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
_ol_format_JSONFeature_.prototype.readProjection = function(source) {
|
JSONFeature.prototype.readProjection = function(source) {
|
||||||
return this.readProjectionFromObject(this.getObject_(source));
|
return this.readProjectionFromObject(this.getObject_(source));
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -118,13 +118,13 @@ _ol_format_JSONFeature_.prototype.readProjection = function(source) {
|
|||||||
* @protected
|
* @protected
|
||||||
* @return {ol.proj.Projection} Projection.
|
* @return {ol.proj.Projection} Projection.
|
||||||
*/
|
*/
|
||||||
_ol_format_JSONFeature_.prototype.readProjectionFromObject = function(object) {};
|
JSONFeature.prototype.readProjectionFromObject = function(object) {};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
_ol_format_JSONFeature_.prototype.writeFeature = function(feature, opt_options) {
|
JSONFeature.prototype.writeFeature = function(feature, opt_options) {
|
||||||
return JSON.stringify(this.writeFeatureObject(feature, opt_options));
|
return JSON.stringify(this.writeFeatureObject(feature, opt_options));
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -135,13 +135,13 @@ _ol_format_JSONFeature_.prototype.writeFeature = function(feature, opt_options)
|
|||||||
* @param {olx.format.WriteOptions=} opt_options Write options.
|
* @param {olx.format.WriteOptions=} opt_options Write options.
|
||||||
* @return {Object} Object.
|
* @return {Object} Object.
|
||||||
*/
|
*/
|
||||||
_ol_format_JSONFeature_.prototype.writeFeatureObject = function(feature, opt_options) {};
|
JSONFeature.prototype.writeFeatureObject = function(feature, opt_options) {};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
_ol_format_JSONFeature_.prototype.writeFeatures = function(features, opt_options) {
|
JSONFeature.prototype.writeFeatures = function(features, opt_options) {
|
||||||
return JSON.stringify(this.writeFeaturesObject(features, opt_options));
|
return JSON.stringify(this.writeFeaturesObject(features, opt_options));
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -152,13 +152,13 @@ _ol_format_JSONFeature_.prototype.writeFeatures = function(features, opt_options
|
|||||||
* @param {olx.format.WriteOptions=} opt_options Write options.
|
* @param {olx.format.WriteOptions=} opt_options Write options.
|
||||||
* @return {Object} Object.
|
* @return {Object} Object.
|
||||||
*/
|
*/
|
||||||
_ol_format_JSONFeature_.prototype.writeFeaturesObject = function(features, opt_options) {};
|
JSONFeature.prototype.writeFeaturesObject = function(features, opt_options) {};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
_ol_format_JSONFeature_.prototype.writeGeometry = function(geometry, opt_options) {
|
JSONFeature.prototype.writeGeometry = function(geometry, opt_options) {
|
||||||
return JSON.stringify(this.writeGeometryObject(geometry, opt_options));
|
return JSON.stringify(this.writeGeometryObject(geometry, opt_options));
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -169,5 +169,5 @@ _ol_format_JSONFeature_.prototype.writeGeometry = function(geometry, opt_options
|
|||||||
* @param {olx.format.WriteOptions=} opt_options Write options.
|
* @param {olx.format.WriteOptions=} opt_options Write options.
|
||||||
* @return {Object} Object.
|
* @return {Object} Object.
|
||||||
*/
|
*/
|
||||||
_ol_format_JSONFeature_.prototype.writeGeometryObject = function(geometry, opt_options) {};
|
JSONFeature.prototype.writeGeometryObject = function(geometry, opt_options) {};
|
||||||
export default _ol_format_JSONFeature_;
|
export default JSONFeature;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import {inherits} from '../index.js';
|
import {inherits} from '../index.js';
|
||||||
import _ol_Feature_ from '../Feature.js';
|
import _ol_Feature_ from '../Feature.js';
|
||||||
import FeatureFormat from '../format/Feature.js';
|
import FeatureFormat from '../format/Feature.js';
|
||||||
import _ol_format_JSONFeature_ from '../format/JSONFeature.js';
|
import JSONFeature from '../format/JSONFeature.js';
|
||||||
import LineString from '../geom/LineString.js';
|
import LineString from '../geom/LineString.js';
|
||||||
import MultiLineString from '../geom/MultiLineString.js';
|
import MultiLineString from '../geom/MultiLineString.js';
|
||||||
import MultiPoint from '../geom/MultiPoint.js';
|
import MultiPoint from '../geom/MultiPoint.js';
|
||||||
@@ -26,7 +26,7 @@ var _ol_format_TopoJSON_ = function(opt_options) {
|
|||||||
|
|
||||||
var options = opt_options ? opt_options : {};
|
var options = opt_options ? opt_options : {};
|
||||||
|
|
||||||
_ol_format_JSONFeature_.call(this);
|
JSONFeature.call(this);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -49,7 +49,7 @@ var _ol_format_TopoJSON_ = function(opt_options) {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inherits(_ol_format_TopoJSON_, _ol_format_JSONFeature_);
|
inherits(_ol_format_TopoJSON_, JSONFeature);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user