Rename _ol_geom_LineString_ to LineString
This commit is contained in:
@@ -9,7 +9,7 @@ import _ol_format_Feature_ from '../format/Feature.js';
|
||||
import _ol_format_JSONFeature_ from '../format/JSONFeature.js';
|
||||
import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js';
|
||||
import _ol_geom_GeometryType_ from '../geom/GeometryType.js';
|
||||
import _ol_geom_LineString_ from '../geom/LineString.js';
|
||||
import LineString from '../geom/LineString.js';
|
||||
import _ol_geom_LinearRing_ from '../geom/LinearRing.js';
|
||||
import _ol_geom_MultiLineString_ from '../geom/MultiLineString.js';
|
||||
import MultiPoint from '../geom/MultiPoint.js';
|
||||
@@ -174,7 +174,7 @@ _ol_format_EsriJSON_.readPointGeometry_ = function(object) {
|
||||
*/
|
||||
_ol_format_EsriJSON_.readLineStringGeometry_ = function(object) {
|
||||
var layout = _ol_format_EsriJSON_.getGeometryLayout_(object);
|
||||
return new _ol_geom_LineString_(object.paths[0], layout);
|
||||
return new LineString(object.paths[0], layout);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import _ol_format_GMLBase_ from '../format/GMLBase.js';
|
||||
import _ol_format_XSD_ from '../format/XSD.js';
|
||||
import _ol_geom_Geometry_ from '../geom/Geometry.js';
|
||||
import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js';
|
||||
import _ol_geom_LineString_ from '../geom/LineString.js';
|
||||
import LineString from '../geom/LineString.js';
|
||||
import _ol_geom_MultiLineString_ from '../geom/MultiLineString.js';
|
||||
import _ol_geom_MultiPolygon_ from '../geom/MultiPolygon.js';
|
||||
import _ol_geom_Polygon_ from '../geom/Polygon.js';
|
||||
@@ -272,7 +272,7 @@ _ol_format_GML3_.prototype.readCurve_ = function(node, objectStack) {
|
||||
var flatCoordinates = _ol_xml_.pushParseAndPop([null],
|
||||
this.CURVE_PARSERS_, node, objectStack, this);
|
||||
if (flatCoordinates) {
|
||||
var lineString = new _ol_geom_LineString_(null);
|
||||
var lineString = new LineString(null);
|
||||
lineString.setFlatCoordinates(_ol_geom_GeometryLayout_.XYZ, flatCoordinates);
|
||||
return lineString;
|
||||
} else {
|
||||
|
||||
@@ -10,7 +10,7 @@ import _ol_Feature_ from '../Feature.js';
|
||||
import _ol_format_Feature_ from '../format/Feature.js';
|
||||
import _ol_format_XMLFeature_ from '../format/XMLFeature.js';
|
||||
import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js';
|
||||
import _ol_geom_LineString_ from '../geom/LineString.js';
|
||||
import LineString from '../geom/LineString.js';
|
||||
import _ol_geom_LinearRing_ from '../geom/LinearRing.js';
|
||||
import _ol_geom_MultiLineString_ from '../geom/MultiLineString.js';
|
||||
import MultiPoint from '../geom/MultiPoint.js';
|
||||
@@ -368,7 +368,7 @@ _ol_format_GMLBase_.prototype.readLineString = function(node, objectStack) {
|
||||
var flatCoordinates =
|
||||
this.readFlatCoordinatesFromNode_(node, objectStack);
|
||||
if (flatCoordinates) {
|
||||
var lineString = new _ol_geom_LineString_(null);
|
||||
var lineString = new LineString(null);
|
||||
lineString.setFlatCoordinates(_ol_geom_GeometryLayout_.XYZ, flatCoordinates);
|
||||
return lineString;
|
||||
} else {
|
||||
|
||||
@@ -8,7 +8,7 @@ import _ol_format_Feature_ from '../format/Feature.js';
|
||||
import _ol_format_XMLFeature_ from '../format/XMLFeature.js';
|
||||
import _ol_format_XSD_ from '../format/XSD.js';
|
||||
import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js';
|
||||
import _ol_geom_LineString_ from '../geom/LineString.js';
|
||||
import LineString from '../geom/LineString.js';
|
||||
import _ol_geom_MultiLineString_ from '../geom/MultiLineString.js';
|
||||
import Point from '../geom/Point.js';
|
||||
import {get as getProjection} from '../proj.js';
|
||||
@@ -240,7 +240,7 @@ _ol_format_GPX_.readRte_ = function(node, objectStack) {
|
||||
var layoutOptions = /** @type {ol.LayoutOptions} */ (values['layoutOptions']);
|
||||
delete values['layoutOptions'];
|
||||
var layout = _ol_format_GPX_.applyLayoutOptions_(layoutOptions, flatCoordinates);
|
||||
var geometry = new _ol_geom_LineString_(null);
|
||||
var geometry = new LineString(null);
|
||||
geometry.setFlatCoordinates(layout, flatCoordinates);
|
||||
_ol_format_Feature_.transformWithOptions(geometry, false, options);
|
||||
var feature = new _ol_Feature_(geometry);
|
||||
|
||||
@@ -10,7 +10,7 @@ import _ol_Feature_ from '../Feature.js';
|
||||
import _ol_format_Feature_ from '../format/Feature.js';
|
||||
import _ol_format_JSONFeature_ from '../format/JSONFeature.js';
|
||||
import _ol_geom_GeometryCollection_ from '../geom/GeometryCollection.js';
|
||||
import _ol_geom_LineString_ from '../geom/LineString.js';
|
||||
import LineString from '../geom/LineString.js';
|
||||
import _ol_geom_MultiLineString_ from '../geom/MultiLineString.js';
|
||||
import MultiPoint from '../geom/MultiPoint.js';
|
||||
import _ol_geom_MultiPolygon_ from '../geom/MultiPolygon.js';
|
||||
@@ -119,7 +119,7 @@ _ol_format_GeoJSON_.readPointGeometry_ = function(object) {
|
||||
* @return {ol.geom.LineString} LineString.
|
||||
*/
|
||||
_ol_format_GeoJSON_.readLineStringGeometry_ = function(object) {
|
||||
return new _ol_geom_LineString_(object.coordinates);
|
||||
return new LineString(object.coordinates);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import _ol_format_Feature_ from '../format/Feature.js';
|
||||
import _ol_format_IGCZ_ from '../format/IGCZ.js';
|
||||
import _ol_format_TextFeature_ from '../format/TextFeature.js';
|
||||
import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js';
|
||||
import _ol_geom_LineString_ from '../geom/LineString.js';
|
||||
import LineString from '../geom/LineString.js';
|
||||
import {get as getProjection} from '../proj.js';
|
||||
|
||||
/**
|
||||
@@ -157,7 +157,7 @@ _ol_format_IGC_.prototype.readFeatureFromText = function(text, opt_options) {
|
||||
if (flatCoordinates.length === 0) {
|
||||
return null;
|
||||
}
|
||||
var lineString = new _ol_geom_LineString_(null);
|
||||
var lineString = new LineString(null);
|
||||
var layout = altitudeMode == _ol_format_IGCZ_.NONE ?
|
||||
_ol_geom_GeometryLayout_.XYM : _ol_geom_GeometryLayout_.XYZM;
|
||||
lineString.setFlatCoordinates(layout, flatCoordinates);
|
||||
|
||||
@@ -17,7 +17,7 @@ import _ol_format_XSD_ from '../format/XSD.js';
|
||||
import _ol_geom_GeometryCollection_ from '../geom/GeometryCollection.js';
|
||||
import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js';
|
||||
import _ol_geom_GeometryType_ from '../geom/GeometryType.js';
|
||||
import _ol_geom_LineString_ from '../geom/LineString.js';
|
||||
import LineString from '../geom/LineString.js';
|
||||
import _ol_geom_MultiLineString_ from '../geom/MultiLineString.js';
|
||||
import MultiPoint from '../geom/MultiPoint.js';
|
||||
import _ol_geom_MultiPolygon_ from '../geom/MultiPolygon.js';
|
||||
@@ -816,7 +816,7 @@ _ol_format_KML_.readGxTrack_ = function(node, objectStack) {
|
||||
++i) {
|
||||
flatCoordinates[4 * i + 3] = whens[i];
|
||||
}
|
||||
var lineString = new _ol_geom_LineString_(null);
|
||||
var lineString = new LineString(null);
|
||||
lineString.setFlatCoordinates(_ol_geom_GeometryLayout_.XYZM, flatCoordinates);
|
||||
return lineString;
|
||||
};
|
||||
@@ -864,7 +864,7 @@ _ol_format_KML_.readLineString_ = function(node, objectStack) {
|
||||
var flatCoordinates =
|
||||
_ol_format_KML_.readFlatCoordinatesFromNode_(node, objectStack);
|
||||
if (flatCoordinates) {
|
||||
var lineString = new _ol_geom_LineString_(null);
|
||||
var lineString = new LineString(null);
|
||||
lineString.setFlatCoordinates(_ol_geom_GeometryLayout_.XYZ, flatCoordinates);
|
||||
lineString.setProperties(properties);
|
||||
return lineString;
|
||||
|
||||
@@ -10,7 +10,7 @@ import _ol_format_Feature_ from '../format/Feature.js';
|
||||
import _ol_format_FormatType_ from '../format/FormatType.js';
|
||||
import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js';
|
||||
import _ol_geom_GeometryType_ from '../geom/GeometryType.js';
|
||||
import _ol_geom_LineString_ from '../geom/LineString.js';
|
||||
import LineString from '../geom/LineString.js';
|
||||
import _ol_geom_MultiLineString_ from '../geom/MultiLineString.js';
|
||||
import MultiPoint from '../geom/MultiPoint.js';
|
||||
import _ol_geom_MultiPolygon_ from '../geom/MultiPolygon.js';
|
||||
@@ -311,7 +311,7 @@ _ol_format_MVT_.prototype.createFeature_ = function(pbf, rawFeature, opt_options
|
||||
}
|
||||
} else {
|
||||
geom = geometryType === _ol_geom_GeometryType_.POINT ? new Point(null) :
|
||||
geometryType === _ol_geom_GeometryType_.LINE_STRING ? new _ol_geom_LineString_(null) :
|
||||
geometryType === _ol_geom_GeometryType_.LINE_STRING ? new LineString(null) :
|
||||
geometryType === _ol_geom_GeometryType_.POLYGON ? new _ol_geom_Polygon_(null) :
|
||||
geometryType === _ol_geom_GeometryType_.MULTI_POINT ? new MultiPoint (null) :
|
||||
geometryType === _ol_geom_GeometryType_.MULTI_LINE_STRING ? new _ol_geom_MultiLineString_(null) :
|
||||
|
||||
@@ -8,7 +8,7 @@ import _ol_Feature_ from '../Feature.js';
|
||||
import _ol_format_Feature_ from '../format/Feature.js';
|
||||
import _ol_format_XMLFeature_ from '../format/XMLFeature.js';
|
||||
import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js';
|
||||
import _ol_geom_LineString_ from '../geom/LineString.js';
|
||||
import LineString from '../geom/LineString.js';
|
||||
import Point from '../geom/Point.js';
|
||||
import _ol_geom_Polygon_ from '../geom/Polygon.js';
|
||||
import _ol_obj_ from '../obj.js';
|
||||
@@ -189,7 +189,7 @@ _ol_format_OSMXML_.prototype.readFeaturesFromNode = function(node, opt_options)
|
||||
geometry.setFlatCoordinates(_ol_geom_GeometryLayout_.XY, flatCoordinates,
|
||||
[flatCoordinates.length]);
|
||||
} else {
|
||||
geometry = new _ol_geom_LineString_(null);
|
||||
geometry = new LineString(null);
|
||||
geometry.setFlatCoordinates(_ol_geom_GeometryLayout_.XY, flatCoordinates);
|
||||
}
|
||||
_ol_format_Feature_.transformWithOptions(geometry, false, options);
|
||||
|
||||
@@ -7,7 +7,7 @@ import _ol_Feature_ from '../Feature.js';
|
||||
import _ol_format_Feature_ from '../format/Feature.js';
|
||||
import _ol_format_TextFeature_ from '../format/TextFeature.js';
|
||||
import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js';
|
||||
import _ol_geom_LineString_ from '../geom/LineString.js';
|
||||
import LineString from '../geom/LineString.js';
|
||||
import _ol_geom_SimpleGeometry_ from '../geom/SimpleGeometry.js';
|
||||
import _ol_geom_flat_flip_ from '../geom/flat/flip.js';
|
||||
import _ol_geom_flat_inflate_ from '../geom/flat/inflate.js';
|
||||
@@ -334,7 +334,7 @@ _ol_format_Polyline_.prototype.readGeometryFromText = function(text, opt_options
|
||||
|
||||
return (
|
||||
/** @type {ol.geom.Geometry} */ _ol_format_Feature_.transformWithOptions(
|
||||
new _ol_geom_LineString_(coordinates, this.geometryLayout_), false,
|
||||
new LineString(coordinates, this.geometryLayout_), false,
|
||||
this.adaptOptions(opt_options))
|
||||
);
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@ import {inherits} from '../index.js';
|
||||
import _ol_Feature_ from '../Feature.js';
|
||||
import _ol_format_Feature_ from '../format/Feature.js';
|
||||
import _ol_format_JSONFeature_ from '../format/JSONFeature.js';
|
||||
import _ol_geom_LineString_ from '../geom/LineString.js';
|
||||
import LineString from '../geom/LineString.js';
|
||||
import _ol_geom_MultiLineString_ from '../geom/MultiLineString.js';
|
||||
import MultiPoint from '../geom/MultiPoint.js';
|
||||
import _ol_geom_MultiPolygon_ from '../geom/MultiPolygon.js';
|
||||
@@ -140,7 +140,7 @@ _ol_format_TopoJSON_.readMultiPointGeometry_ = function(object, scale,
|
||||
*/
|
||||
_ol_format_TopoJSON_.readLineStringGeometry_ = function(object, arcs) {
|
||||
var coordinates = _ol_format_TopoJSON_.concatenateArcs_(object.arcs, arcs);
|
||||
return new _ol_geom_LineString_(coordinates);
|
||||
return new LineString(coordinates);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import _ol_format_TextFeature_ from '../format/TextFeature.js';
|
||||
import _ol_geom_GeometryCollection_ from '../geom/GeometryCollection.js';
|
||||
import _ol_geom_GeometryType_ from '../geom/GeometryType.js';
|
||||
import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js';
|
||||
import _ol_geom_LineString_ from '../geom/LineString.js';
|
||||
import LineString from '../geom/LineString.js';
|
||||
import _ol_geom_MultiLineString_ from '../geom/MultiLineString.js';
|
||||
import MultiPoint from '../geom/MultiPoint.js';
|
||||
import _ol_geom_MultiPolygon_ from '../geom/MultiPolygon.js';
|
||||
@@ -919,7 +919,7 @@ _ol_format_WKT_.Parser.prototype.formatErrorMessage_ = function() {
|
||||
*/
|
||||
_ol_format_WKT_.Parser.GeometryConstructor_ = {
|
||||
'POINT': Point,
|
||||
'LINESTRING': _ol_geom_LineString_,
|
||||
'LINESTRING': LineString,
|
||||
'POLYGON': _ol_geom_Polygon_,
|
||||
'MULTIPOINT': MultiPoint,
|
||||
'MULTILINESTRING': _ol_geom_MultiLineString_,
|
||||
|
||||
Reference in New Issue
Block a user