Rename _ol_geom_LineString_ to LineString

This commit is contained in:
Tim Schaub
2017-12-14 08:54:53 -07:00
parent ad5806c29d
commit f7b3876c1b
55 changed files with 270 additions and 270 deletions

View File

@@ -4,7 +4,7 @@
import _ol_coordinate_ from './coordinate.js';
import {intersects, getCenter} from './extent.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_flat_geodesic_ from './geom/flat/geodesic.js';
import _ol_math_ from './math.js';
@@ -491,7 +491,7 @@ _ol_Graticule_.prototype.getMeridian_ = function(lon, minLat, maxLat,
var flatCoordinates = _ol_geom_flat_geodesic_.meridian(lon,
minLat, maxLat, this.projection_, squaredTolerance);
var lineString = this.meridians_[index] !== undefined ?
this.meridians_[index] : new _ol_geom_LineString_(null);
this.meridians_[index] : new LineString(null);
lineString.setFlatCoordinates(_ol_geom_GeometryLayout_.XY, flatCoordinates);
return lineString;
};
@@ -521,7 +521,7 @@ _ol_Graticule_.prototype.getParallel_ = function(lat, minLon, maxLon,
var flatCoordinates = _ol_geom_flat_geodesic_.parallel(lat,
minLon, maxLon, this.projection_, squaredTolerance);
var lineString = this.parallels_[index] !== undefined ?
this.parallels_[index] : new _ol_geom_LineString_(null);
this.parallels_[index] : new LineString(null);
lineString.setFlatCoordinates(_ol_geom_GeometryLayout_.XY, flatCoordinates);
return lineString;
};

View File

@@ -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);
};

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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);

View File

@@ -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);
};

View File

@@ -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);

View File

@@ -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;

View File

@@ -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) :

View File

@@ -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);

View File

@@ -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))
);
};

View File

@@ -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);
};

View File

@@ -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_,

View File

@@ -26,7 +26,7 @@ import _ol_geom_flat_simplify_ from '../geom/flat/simplify.js';
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
* @api
*/
var _ol_geom_LineString_ = function(coordinates, opt_layout) {
var LineString = function(coordinates, opt_layout) {
_ol_geom_SimpleGeometry_.call(this);
@@ -58,7 +58,7 @@ var _ol_geom_LineString_ = function(coordinates, opt_layout) {
};
inherits(_ol_geom_LineString_, _ol_geom_SimpleGeometry_);
inherits(LineString, _ol_geom_SimpleGeometry_);
/**
@@ -66,7 +66,7 @@ inherits(_ol_geom_LineString_, _ol_geom_SimpleGeometry_);
* @param {ol.Coordinate} coordinate Coordinate.
* @api
*/
_ol_geom_LineString_.prototype.appendCoordinate = function(coordinate) {
LineString.prototype.appendCoordinate = function(coordinate) {
if (!this.flatCoordinates) {
this.flatCoordinates = coordinate.slice();
} else {
@@ -82,8 +82,8 @@ _ol_geom_LineString_.prototype.appendCoordinate = function(coordinate) {
* @override
* @api
*/
_ol_geom_LineString_.prototype.clone = function() {
var lineString = new _ol_geom_LineString_(null);
LineString.prototype.clone = function() {
var lineString = new LineString(null);
lineString.setFlatCoordinates(this.layout, this.flatCoordinates.slice());
return lineString;
};
@@ -92,7 +92,7 @@ _ol_geom_LineString_.prototype.clone = function() {
/**
* @inheritDoc
*/
_ol_geom_LineString_.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
LineString.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
return minSquaredDistance;
}
@@ -120,7 +120,7 @@ _ol_geom_LineString_.prototype.closestPointXY = function(x, y, closestPoint, min
* @template T,S
* @api
*/
_ol_geom_LineString_.prototype.forEachSegment = function(callback, opt_this) {
LineString.prototype.forEachSegment = function(callback, opt_this) {
return _ol_geom_flat_segments_.forEach(this.flatCoordinates, 0,
this.flatCoordinates.length, this.stride, callback, opt_this);
};
@@ -140,7 +140,7 @@ _ol_geom_LineString_.prototype.forEachSegment = function(callback, opt_this) {
* @return {ol.Coordinate} Coordinate.
* @api
*/
_ol_geom_LineString_.prototype.getCoordinateAtM = function(m, opt_extrapolate) {
LineString.prototype.getCoordinateAtM = function(m, opt_extrapolate) {
if (this.layout != _ol_geom_GeometryLayout_.XYM &&
this.layout != _ol_geom_GeometryLayout_.XYZM) {
return null;
@@ -157,7 +157,7 @@ _ol_geom_LineString_.prototype.getCoordinateAtM = function(m, opt_extrapolate) {
* @override
* @api
*/
_ol_geom_LineString_.prototype.getCoordinates = function() {
LineString.prototype.getCoordinates = function() {
return _ol_geom_flat_inflate_.coordinates(
this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);
};
@@ -173,7 +173,7 @@ _ol_geom_LineString_.prototype.getCoordinates = function() {
* @return {ol.Coordinate} Coordinate of the interpolated point.
* @api
*/
_ol_geom_LineString_.prototype.getCoordinateAt = function(fraction, opt_dest) {
LineString.prototype.getCoordinateAt = function(fraction, opt_dest) {
return _ol_geom_flat_interpolate_.lineString(
this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,
fraction, opt_dest);
@@ -185,7 +185,7 @@ _ol_geom_LineString_.prototype.getCoordinateAt = function(fraction, opt_dest) {
* @return {number} Length (on projected plane).
* @api
*/
_ol_geom_LineString_.prototype.getLength = function() {
LineString.prototype.getLength = function() {
return _ol_geom_flat_length_.lineString(
this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);
};
@@ -194,7 +194,7 @@ _ol_geom_LineString_.prototype.getLength = function() {
/**
* @return {Array.<number>} Flat midpoint.
*/
_ol_geom_LineString_.prototype.getFlatMidpoint = function() {
LineString.prototype.getFlatMidpoint = function() {
if (this.flatMidpointRevision_ != this.getRevision()) {
this.flatMidpoint_ = this.getCoordinateAt(0.5, this.flatMidpoint_);
this.flatMidpointRevision_ = this.getRevision();
@@ -206,12 +206,12 @@ _ol_geom_LineString_.prototype.getFlatMidpoint = function() {
/**
* @inheritDoc
*/
_ol_geom_LineString_.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
LineString.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
var simplifiedFlatCoordinates = [];
simplifiedFlatCoordinates.length = _ol_geom_flat_simplify_.douglasPeucker(
this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,
squaredTolerance, simplifiedFlatCoordinates, 0);
var simplifiedLineString = new _ol_geom_LineString_(null);
var simplifiedLineString = new LineString(null);
simplifiedLineString.setFlatCoordinates(
_ol_geom_GeometryLayout_.XY, simplifiedFlatCoordinates);
return simplifiedLineString;
@@ -222,7 +222,7 @@ _ol_geom_LineString_.prototype.getSimplifiedGeometryInternal = function(squaredT
* @inheritDoc
* @api
*/
_ol_geom_LineString_.prototype.getType = function() {
LineString.prototype.getType = function() {
return _ol_geom_GeometryType_.LINE_STRING;
};
@@ -231,7 +231,7 @@ _ol_geom_LineString_.prototype.getType = function() {
* @inheritDoc
* @api
*/
_ol_geom_LineString_.prototype.intersectsExtent = function(extent) {
LineString.prototype.intersectsExtent = function(extent) {
return _ol_geom_flat_intersectsextent_.lineString(
this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,
extent);
@@ -245,7 +245,7 @@ _ol_geom_LineString_.prototype.intersectsExtent = function(extent) {
* @override
* @api
*/
_ol_geom_LineString_.prototype.setCoordinates = function(coordinates, opt_layout) {
LineString.prototype.setCoordinates = function(coordinates, opt_layout) {
if (!coordinates) {
this.setFlatCoordinates(_ol_geom_GeometryLayout_.XY, null);
} else {
@@ -264,8 +264,8 @@ _ol_geom_LineString_.prototype.setCoordinates = function(coordinates, opt_layout
* @param {ol.geom.GeometryLayout} layout Layout.
* @param {Array.<number>} flatCoordinates Flat coordinates.
*/
_ol_geom_LineString_.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
LineString.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
this.setFlatCoordinatesInternal(layout, flatCoordinates);
this.changed();
};
export default _ol_geom_LineString_;
export default LineString;

View File

@@ -6,7 +6,7 @@ import _ol_array_ from '../array.js';
import {closestSquaredDistanceXY} from '../extent.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_SimpleGeometry_ from '../geom/SimpleGeometry.js';
import _ol_geom_flat_closest_ from '../geom/flat/closest.js';
import _ol_geom_flat_deflate_ from '../geom/flat/deflate.js';
@@ -168,7 +168,7 @@ _ol_geom_MultiLineString_.prototype.getLineString = function(index) {
if (index < 0 || this.ends_.length <= index) {
return null;
}
var lineString = new _ol_geom_LineString_(null);
var lineString = new LineString(null);
lineString.setFlatCoordinates(this.layout, this.flatCoordinates.slice(
index === 0 ? 0 : this.ends_[index - 1], this.ends_[index]));
return lineString;
@@ -190,7 +190,7 @@ _ol_geom_MultiLineString_.prototype.getLineStrings = function() {
var i, ii;
for (i = 0, ii = ends.length; i < ii; ++i) {
var end = ends[i];
var lineString = new _ol_geom_LineString_(null);
var lineString = new LineString(null);
lineString.setFlatCoordinates(layout, flatCoordinates.slice(offset, end));
lineStrings.push(lineString);
offset = end;

View File

@@ -13,7 +13,7 @@ import {boundingExtent, getBottomLeft, getBottomRight, getTopLeft, getTopRight}
import _ol_functions_ from '../functions.js';
import _ol_geom_Circle_ from '../geom/Circle.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';
@@ -154,7 +154,7 @@ var _ol_interaction_Draw_ = function(options) {
if (mode === _ol_interaction_Draw_.Mode_.POINT) {
Constructor = Point;
} else if (mode === _ol_interaction_Draw_.Mode_.LINE_STRING) {
Constructor = _ol_geom_LineString_;
Constructor = LineString;
} else if (mode === _ol_interaction_Draw_.Mode_.POLYGON) {
Constructor = _ol_geom_Polygon_;
}
@@ -511,7 +511,7 @@ _ol_interaction_Draw_.prototype.startDrawing_ = function(event) {
}
if (this.sketchLineCoords_) {
this.sketchLine_ = new _ol_Feature_(
new _ol_geom_LineString_(this.sketchLineCoords_));
new LineString(this.sketchLineCoords_));
}
var geometry = this.geometryFunction_(this.sketchCoords_);
this.sketchFeature_ = new _ol_Feature_();
@@ -558,7 +558,7 @@ _ol_interaction_Draw_.prototype.modifyDrawing_ = function(event) {
if (geometry instanceof _ol_geom_Polygon_ &&
this.mode_ !== _ol_interaction_Draw_.Mode_.POLYGON) {
if (!this.sketchLine_) {
this.sketchLine_ = new _ol_Feature_(new _ol_geom_LineString_(null));
this.sketchLine_ = new _ol_Feature_(new LineString(null));
}
var ring = geometry.getLinearRing(0);
sketchLineGeom = /** @type {ol.geom.LineString} */ (this.sketchLine_.getGeometry());