Rename _ol_geom_MultiPoint_ to MultiPoint

This commit is contained in:
Tim Schaub
2017-12-14 08:51:53 -07:00
parent eadec38ae2
commit ad5806c29d
25 changed files with 98 additions and 98 deletions

View File

@@ -12,7 +12,7 @@ import _ol_geom_GeometryType_ from '../geom/GeometryType.js';
import _ol_geom_LineString_ from '../geom/LineString.js';
import _ol_geom_LinearRing_ from '../geom/LinearRing.js';
import _ol_geom_MultiLineString_ from '../geom/MultiLineString.js';
import _ol_geom_MultiPoint_ from '../geom/MultiPoint.js';
import MultiPoint from '../geom/MultiPoint.js';
import _ol_geom_MultiPolygon_ from '../geom/MultiPolygon.js';
import Point from '../geom/Point.js';
import _ol_geom_Polygon_ from '../geom/Polygon.js';
@@ -214,7 +214,7 @@ _ol_format_EsriJSON_.getGeometryLayout_ = function(object) {
*/
_ol_format_EsriJSON_.readMultiPointGeometry_ = function(object) {
var layout = _ol_format_EsriJSON_.getGeometryLayout_(object);
return new _ol_geom_MultiPoint_(object.points, layout);
return new MultiPoint(object.points, layout);
};

View File

@@ -13,7 +13,7 @@ import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js';
import _ol_geom_LineString_ from '../geom/LineString.js';
import _ol_geom_LinearRing_ from '../geom/LinearRing.js';
import _ol_geom_MultiLineString_ from '../geom/MultiLineString.js';
import _ol_geom_MultiPoint_ from '../geom/MultiPoint.js';
import MultiPoint from '../geom/MultiPoint.js';
import _ol_geom_MultiPolygon_ from '../geom/MultiPolygon.js';
import Point from '../geom/Point.js';
import _ol_geom_Polygon_ from '../geom/Polygon.js';
@@ -281,7 +281,7 @@ _ol_format_GMLBase_.prototype.readMultiPoint = function(node, objectStack) {
var coordinates = _ol_xml_.pushParseAndPop([],
this.MULTIPOINT_PARSERS_, node, objectStack, this);
if (coordinates) {
return new _ol_geom_MultiPoint_(coordinates);
return new MultiPoint(coordinates);
} else {
return undefined;
}

View File

@@ -12,7 +12,7 @@ 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 _ol_geom_MultiLineString_ from '../geom/MultiLineString.js';
import _ol_geom_MultiPoint_ from '../geom/MultiPoint.js';
import MultiPoint from '../geom/MultiPoint.js';
import _ol_geom_MultiPolygon_ from '../geom/MultiPolygon.js';
import Point from '../geom/Point.js';
import _ol_geom_Polygon_ from '../geom/Polygon.js';
@@ -139,7 +139,7 @@ _ol_format_GeoJSON_.readMultiLineStringGeometry_ = function(object) {
* @return {ol.geom.MultiPoint} MultiPoint.
*/
_ol_format_GeoJSON_.readMultiPointGeometry_ = function(object) {
return new _ol_geom_MultiPoint_(object.coordinates);
return new MultiPoint(object.coordinates);
};

View File

@@ -19,7 +19,7 @@ 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 _ol_geom_MultiLineString_ from '../geom/MultiLineString.js';
import _ol_geom_MultiPoint_ from '../geom/MultiPoint.js';
import MultiPoint from '../geom/MultiPoint.js';
import _ol_geom_MultiPolygon_ from '../geom/MultiPolygon.js';
import Point from '../geom/Point.js';
import _ol_geom_Polygon_ from '../geom/Polygon.js';
@@ -936,7 +936,7 @@ _ol_format_KML_.readMultiGeometry_ = function(node, objectStack) {
geometry = geometries[i];
_ol_array_.extend(flatCoordinates, geometry.getFlatCoordinates());
}
multiGeometry = new _ol_geom_MultiPoint_(null);
multiGeometry = new MultiPoint(null);
multiGeometry.setFlatCoordinates(layout, flatCoordinates);
_ol_format_KML_.setCommonGeometryProperties_(multiGeometry, geometries);
} else if (type == _ol_geom_GeometryType_.LINE_STRING) {

View File

@@ -12,7 +12,7 @@ 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 _ol_geom_MultiLineString_ from '../geom/MultiLineString.js';
import _ol_geom_MultiPoint_ from '../geom/MultiPoint.js';
import MultiPoint from '../geom/MultiPoint.js';
import _ol_geom_MultiPolygon_ from '../geom/MultiPolygon.js';
import Point from '../geom/Point.js';
import _ol_geom_Polygon_ from '../geom/Polygon.js';
@@ -313,7 +313,7 @@ _ol_format_MVT_.prototype.createFeature_ = function(pbf, rawFeature, opt_options
geom = geometryType === _ol_geom_GeometryType_.POINT ? new Point(null) :
geometryType === _ol_geom_GeometryType_.LINE_STRING ? new _ol_geom_LineString_(null) :
geometryType === _ol_geom_GeometryType_.POLYGON ? new _ol_geom_Polygon_(null) :
geometryType === _ol_geom_GeometryType_.MULTI_POINT ? new _ol_geom_MultiPoint_ (null) :
geometryType === _ol_geom_GeometryType_.MULTI_POINT ? new MultiPoint (null) :
geometryType === _ol_geom_GeometryType_.MULTI_LINE_STRING ? new _ol_geom_MultiLineString_(null) :
null;
}

View File

@@ -7,7 +7,7 @@ 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 _ol_geom_MultiLineString_ from '../geom/MultiLineString.js';
import _ol_geom_MultiPoint_ from '../geom/MultiPoint.js';
import MultiPoint from '../geom/MultiPoint.js';
import _ol_geom_MultiPolygon_ from '../geom/MultiPolygon.js';
import Point from '../geom/Point.js';
import _ol_geom_Polygon_ from '../geom/Polygon.js';
@@ -126,7 +126,7 @@ _ol_format_TopoJSON_.readMultiPointGeometry_ = function(object, scale,
_ol_format_TopoJSON_.transformVertex_(coordinates[i], scale, translate);
}
}
return new _ol_geom_MultiPoint_(coordinates);
return new MultiPoint(coordinates);
};

View File

@@ -10,7 +10,7 @@ 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 _ol_geom_MultiLineString_ from '../geom/MultiLineString.js';
import _ol_geom_MultiPoint_ from '../geom/MultiPoint.js';
import MultiPoint from '../geom/MultiPoint.js';
import _ol_geom_MultiPolygon_ from '../geom/MultiPolygon.js';
import Point from '../geom/Point.js';
import _ol_geom_Polygon_ from '../geom/Polygon.js';
@@ -921,7 +921,7 @@ _ol_format_WKT_.Parser.GeometryConstructor_ = {
'POINT': Point,
'LINESTRING': _ol_geom_LineString_,
'POLYGON': _ol_geom_Polygon_,
'MULTIPOINT': _ol_geom_MultiPoint_,
'MULTIPOINT': MultiPoint,
'MULTILINESTRING': _ol_geom_MultiLineString_,
'MULTIPOLYGON': _ol_geom_MultiPolygon_
};

View File

@@ -22,12 +22,12 @@ import _ol_math_ from '../math.js';
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
* @api
*/
var _ol_geom_MultiPoint_ = function(coordinates, opt_layout) {
var MultiPoint = function(coordinates, opt_layout) {
_ol_geom_SimpleGeometry_.call(this);
this.setCoordinates(coordinates, opt_layout);
};
inherits(_ol_geom_MultiPoint_, _ol_geom_SimpleGeometry_);
inherits(MultiPoint, _ol_geom_SimpleGeometry_);
/**
@@ -35,7 +35,7 @@ inherits(_ol_geom_MultiPoint_, _ol_geom_SimpleGeometry_);
* @param {ol.geom.Point} point Point.
* @api
*/
_ol_geom_MultiPoint_.prototype.appendPoint = function(point) {
MultiPoint.prototype.appendPoint = function(point) {
if (!this.flatCoordinates) {
this.flatCoordinates = point.getFlatCoordinates().slice();
} else {
@@ -51,8 +51,8 @@ _ol_geom_MultiPoint_.prototype.appendPoint = function(point) {
* @override
* @api
*/
_ol_geom_MultiPoint_.prototype.clone = function() {
var multiPoint = new _ol_geom_MultiPoint_(null);
MultiPoint.prototype.clone = function() {
var multiPoint = new MultiPoint(null);
multiPoint.setFlatCoordinates(this.layout, this.flatCoordinates.slice());
return multiPoint;
};
@@ -61,7 +61,7 @@ _ol_geom_MultiPoint_.prototype.clone = function() {
/**
* @inheritDoc
*/
_ol_geom_MultiPoint_.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
MultiPoint.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
return minSquaredDistance;
}
@@ -89,7 +89,7 @@ _ol_geom_MultiPoint_.prototype.closestPointXY = function(x, y, closestPoint, min
* @override
* @api
*/
_ol_geom_MultiPoint_.prototype.getCoordinates = function() {
MultiPoint.prototype.getCoordinates = function() {
return _ol_geom_flat_inflate_.coordinates(
this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);
};
@@ -101,7 +101,7 @@ _ol_geom_MultiPoint_.prototype.getCoordinates = function() {
* @return {ol.geom.Point} Point.
* @api
*/
_ol_geom_MultiPoint_.prototype.getPoint = function(index) {
MultiPoint.prototype.getPoint = function(index) {
var n = !this.flatCoordinates ?
0 : this.flatCoordinates.length / this.stride;
if (index < 0 || n <= index) {
@@ -119,7 +119,7 @@ _ol_geom_MultiPoint_.prototype.getPoint = function(index) {
* @return {Array.<ol.geom.Point>} Points.
* @api
*/
_ol_geom_MultiPoint_.prototype.getPoints = function() {
MultiPoint.prototype.getPoints = function() {
var flatCoordinates = this.flatCoordinates;
var layout = this.layout;
var stride = this.stride;
@@ -139,7 +139,7 @@ _ol_geom_MultiPoint_.prototype.getPoints = function() {
* @inheritDoc
* @api
*/
_ol_geom_MultiPoint_.prototype.getType = function() {
MultiPoint.prototype.getType = function() {
return _ol_geom_GeometryType_.MULTI_POINT;
};
@@ -148,7 +148,7 @@ _ol_geom_MultiPoint_.prototype.getType = function() {
* @inheritDoc
* @api
*/
_ol_geom_MultiPoint_.prototype.intersectsExtent = function(extent) {
MultiPoint.prototype.intersectsExtent = function(extent) {
var flatCoordinates = this.flatCoordinates;
var stride = this.stride;
var i, ii, x, y;
@@ -170,7 +170,7 @@ _ol_geom_MultiPoint_.prototype.intersectsExtent = function(extent) {
* @override
* @api
*/
_ol_geom_MultiPoint_.prototype.setCoordinates = function(coordinates, opt_layout) {
MultiPoint.prototype.setCoordinates = function(coordinates, opt_layout) {
if (!coordinates) {
this.setFlatCoordinates(_ol_geom_GeometryLayout_.XY, null);
} else {
@@ -189,8 +189,8 @@ _ol_geom_MultiPoint_.prototype.setCoordinates = function(coordinates, opt_layout
* @param {ol.geom.GeometryLayout} layout Layout.
* @param {Array.<number>} flatCoordinates Flat coordinates.
*/
_ol_geom_MultiPoint_.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
MultiPoint.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
this.setFlatCoordinatesInternal(layout, flatCoordinates);
this.changed();
};
export default _ol_geom_MultiPoint_;
export default MultiPoint;

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_MultiPoint_ from '../geom/MultiPoint.js';
import MultiPoint from '../geom/MultiPoint.js';
import _ol_geom_Polygon_ from '../geom/Polygon.js';
import _ol_geom_SimpleGeometry_ from '../geom/SimpleGeometry.js';
import _ol_geom_flat_area_ from '../geom/flat/area.js';
@@ -228,7 +228,7 @@ _ol_geom_MultiPolygon_.prototype.getFlatInteriorPoints = function() {
* @api
*/
_ol_geom_MultiPolygon_.prototype.getInteriorPoints = function() {
var interiorPoints = new _ol_geom_MultiPoint_(null);
var interiorPoints = new MultiPoint(null);
interiorPoints.setFlatCoordinates(_ol_geom_GeometryLayout_.XYM,
this.getFlatInteriorPoints().slice());
return interiorPoints;

View File

@@ -15,7 +15,7 @@ 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 _ol_geom_MultiLineString_ from '../geom/MultiLineString.js';
import _ol_geom_MultiPoint_ from '../geom/MultiPoint.js';
import MultiPoint from '../geom/MultiPoint.js';
import _ol_geom_MultiPolygon_ from '../geom/MultiPolygon.js';
import Point from '../geom/Point.js';
import _ol_geom_Polygon_ from '../geom/Polygon.js';
@@ -672,7 +672,7 @@ _ol_interaction_Draw_.prototype.finishDrawing = function() {
// cast multi-part geometries
if (this.type_ === _ol_geom_GeometryType_.MULTI_POINT) {
sketchFeature.setGeometry(new _ol_geom_MultiPoint_([coordinates]));
sketchFeature.setGeometry(new MultiPoint([coordinates]));
} else if (this.type_ === _ol_geom_GeometryType_.MULTI_LINE_STRING) {
sketchFeature.setGeometry(new _ol_geom_MultiLineString_([coordinates]));
} else if (this.type_ === _ol_geom_GeometryType_.MULTI_POLYGON) {