Rename _ol_geom_MultiPoint_ to MultiPoint
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import _ol_Map_ from '../src/ol/Map.js';
|
||||
import _ol_View_ from '../src/ol/View.js';
|
||||
import _ol_geom_MultiPoint_ from '../src/ol/geom/MultiPoint.js';
|
||||
import MultiPoint from '../src/ol/geom/MultiPoint.js';
|
||||
import Point from '../src/ol/geom/Point.js';
|
||||
import _ol_layer_Tile_ from '../src/ol/layer/Tile.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
@@ -66,7 +66,7 @@ map.on('postcompose', function(event) {
|
||||
coordinates.push([x, y]);
|
||||
}
|
||||
vectorContext.setStyle(imageStyle);
|
||||
vectorContext.drawGeometry(new _ol_geom_MultiPoint_(coordinates));
|
||||
vectorContext.drawGeometry(new MultiPoint(coordinates));
|
||||
|
||||
var headPoint = new Point(coordinates[coordinates.length - 1]);
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import _ol_Map_ from '../src/ol/Map.js';
|
||||
import _ol_View_ from '../src/ol/View.js';
|
||||
import _ol_format_GeoJSON_ from '../src/ol/format/GeoJSON.js';
|
||||
import _ol_geom_MultiPoint_ from '../src/ol/geom/MultiPoint.js';
|
||||
import MultiPoint from '../src/ol/geom/MultiPoint.js';
|
||||
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||
@@ -36,7 +36,7 @@ var styles = [
|
||||
geometry: function(feature) {
|
||||
// return the coordinates of the first ring of the polygon
|
||||
var coordinates = feature.getGeometry().getCoordinates()[0];
|
||||
return new _ol_geom_MultiPoint_(coordinates);
|
||||
return new MultiPoint(coordinates);
|
||||
}
|
||||
})
|
||||
];
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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_
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import _ol_Feature_ from '../../../../src/ol/Feature.js';
|
||||
import Point from '../../../../src/ol/geom/Point.js';
|
||||
import _ol_geom_MultiPoint_ from '../../../../src/ol/geom/MultiPoint.js';
|
||||
import MultiPoint from '../../../../src/ol/geom/MultiPoint.js';
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js';
|
||||
@@ -46,7 +46,7 @@ describe('ol.rendering.style.Circle', function() {
|
||||
function createFeatures(multi) {
|
||||
var feature;
|
||||
feature = new _ol_Feature_({
|
||||
geometry: multi ? new _ol_geom_MultiPoint_([[-20, 18]]) : new Point([-20, 18])
|
||||
geometry: multi ? new MultiPoint([[-20, 18]]) : new Point([-20, 18])
|
||||
});
|
||||
feature.setStyle(new _ol_style_Style_({
|
||||
image: new _ol_style_Circle_({
|
||||
@@ -59,7 +59,7 @@ describe('ol.rendering.style.Circle', function() {
|
||||
vectorSource.addFeature(feature);
|
||||
|
||||
feature = new _ol_Feature_({
|
||||
geometry: multi ? new _ol_geom_MultiPoint_([[-10, 18]]) : new Point([-10, 18])
|
||||
geometry: multi ? new MultiPoint([[-10, 18]]) : new Point([-10, 18])
|
||||
});
|
||||
feature.setStyle(new _ol_style_Style_({
|
||||
image: new _ol_style_Circle_({
|
||||
@@ -72,7 +72,7 @@ describe('ol.rendering.style.Circle', function() {
|
||||
vectorSource.addFeature(feature);
|
||||
|
||||
feature = new _ol_Feature_({
|
||||
geometry: multi ? new _ol_geom_MultiPoint_([[4, 18]]) : new Point([4, 18])
|
||||
geometry: multi ? new MultiPoint([[4, 18]]) : new Point([4, 18])
|
||||
});
|
||||
feature.setStyle(new _ol_style_Style_({
|
||||
image: new _ol_style_Circle_({
|
||||
@@ -85,7 +85,7 @@ describe('ol.rendering.style.Circle', function() {
|
||||
vectorSource.addFeature(feature);
|
||||
|
||||
feature = new _ol_Feature_({
|
||||
geometry: multi ? new _ol_geom_MultiPoint_([[-20, 3]]) : new Point([-20, 3])
|
||||
geometry: multi ? new MultiPoint([[-20, 3]]) : new Point([-20, 3])
|
||||
});
|
||||
feature.setStyle(new _ol_style_Style_({
|
||||
image: new _ol_style_Circle_({
|
||||
@@ -102,7 +102,7 @@ describe('ol.rendering.style.Circle', function() {
|
||||
vectorSource.addFeature(feature);
|
||||
|
||||
feature = new _ol_Feature_({
|
||||
geometry: multi ? new _ol_geom_MultiPoint_([[-10, 3]]) : new Point([-10, 3])
|
||||
geometry: multi ? new MultiPoint([[-10, 3]]) : new Point([-10, 3])
|
||||
});
|
||||
feature.setStyle(new _ol_style_Style_({
|
||||
image: new _ol_style_Circle_({
|
||||
@@ -119,7 +119,7 @@ describe('ol.rendering.style.Circle', function() {
|
||||
vectorSource.addFeature(feature);
|
||||
|
||||
feature = new _ol_Feature_({
|
||||
geometry: multi ? new _ol_geom_MultiPoint_([[4, 3]]) : new Point([4, 3])
|
||||
geometry: multi ? new MultiPoint([[4, 3]]) : new Point([4, 3])
|
||||
});
|
||||
feature.setStyle(new _ol_style_Style_({
|
||||
image: new _ol_style_Circle_({
|
||||
@@ -136,7 +136,7 @@ describe('ol.rendering.style.Circle', function() {
|
||||
vectorSource.addFeature(feature);
|
||||
|
||||
feature = new _ol_Feature_({
|
||||
geometry: multi ? new _ol_geom_MultiPoint_([[-20, -15]]) : new Point([-20, -15])
|
||||
geometry: multi ? new MultiPoint([[-20, -15]]) : new Point([-20, -15])
|
||||
});
|
||||
feature.setStyle(new _ol_style_Style_({
|
||||
image: new _ol_style_Circle_({
|
||||
@@ -150,7 +150,7 @@ describe('ol.rendering.style.Circle', function() {
|
||||
vectorSource.addFeature(feature);
|
||||
|
||||
feature = new _ol_Feature_({
|
||||
geometry: multi ? new _ol_geom_MultiPoint_([[-10, -15]]) : new Point([-10, -15])
|
||||
geometry: multi ? new MultiPoint([[-10, -15]]) : new Point([-10, -15])
|
||||
});
|
||||
feature.setStyle(new _ol_style_Style_({
|
||||
image: new _ol_style_Circle_({
|
||||
@@ -167,7 +167,7 @@ describe('ol.rendering.style.Circle', function() {
|
||||
vectorSource.addFeature(feature);
|
||||
|
||||
feature = new _ol_Feature_({
|
||||
geometry: multi ? new _ol_geom_MultiPoint_([[4, -15]]) : new Point([4, -15])
|
||||
geometry: multi ? new MultiPoint([[4, -15]]) : new Point([4, -15])
|
||||
});
|
||||
feature.setStyle(new _ol_style_Style_({
|
||||
image: new _ol_style_Circle_({
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ol_format_EsriJSON_ from '../../../../src/ol/format/EsriJSON.js';
|
||||
import _ol_geom_LineString_ from '../../../../src/ol/geom/LineString.js';
|
||||
import _ol_geom_LinearRing_ from '../../../../src/ol/geom/LinearRing.js';
|
||||
import _ol_geom_MultiLineString_ from '../../../../src/ol/geom/MultiLineString.js';
|
||||
import _ol_geom_MultiPoint_ from '../../../../src/ol/geom/MultiPoint.js';
|
||||
import MultiPoint from '../../../../src/ol/geom/MultiPoint.js';
|
||||
import _ol_geom_MultiPolygon_ from '../../../../src/ol/geom/MultiPolygon.js';
|
||||
import Point from '../../../../src/ol/geom/Point.js';
|
||||
import _ol_geom_Polygon_ from '../../../../src/ol/geom/Polygon.js';
|
||||
@@ -172,7 +172,7 @@ describe('ol.format.EsriJSON', function() {
|
||||
var feature = format.readFeature(multiPointEsriJSON);
|
||||
expect(feature).to.be.an(_ol_Feature_);
|
||||
var geometry = feature.getGeometry();
|
||||
expect(geometry).to.be.an(_ol_geom_MultiPoint_);
|
||||
expect(geometry).to.be.an(MultiPoint);
|
||||
expect(geometry.getCoordinates()).to.eql([[102.0, 0.0], [103.0, 1.0]]);
|
||||
expect(feature.get('prop0')).to.be('value0');
|
||||
});
|
||||
@@ -387,7 +387,7 @@ describe('ol.format.EsriJSON', function() {
|
||||
});
|
||||
|
||||
var obj = format.readGeometry(str);
|
||||
expect(obj).to.be.a(_ol_geom_MultiPoint_);
|
||||
expect(obj).to.be.a(MultiPoint);
|
||||
expect(obj.getCoordinates()).to.eql([[10, 20], [20, 30]]);
|
||||
expect(obj.getLayout()).to.eql('XY');
|
||||
});
|
||||
@@ -399,7 +399,7 @@ describe('ol.format.EsriJSON', function() {
|
||||
});
|
||||
|
||||
var obj = format.readGeometry(str);
|
||||
expect(obj).to.be.a(_ol_geom_MultiPoint_);
|
||||
expect(obj).to.be.a(MultiPoint);
|
||||
expect(obj.getCoordinates()).to.eql([[10, 20, 0], [20, 30, 0]]);
|
||||
expect(obj.getLayout()).to.eql('XYZ');
|
||||
});
|
||||
@@ -411,7 +411,7 @@ describe('ol.format.EsriJSON', function() {
|
||||
});
|
||||
|
||||
var obj = format.readGeometry(str);
|
||||
expect(obj).to.be.a(_ol_geom_MultiPoint_);
|
||||
expect(obj).to.be.a(MultiPoint);
|
||||
expect(obj.getCoordinates()).to.eql([[10, 20, 0], [20, 30, 0]]);
|
||||
expect(obj.getLayout()).to.eql('XYM');
|
||||
});
|
||||
@@ -424,7 +424,7 @@ describe('ol.format.EsriJSON', function() {
|
||||
});
|
||||
|
||||
var obj = format.readGeometry(str);
|
||||
expect(obj).to.be.a(_ol_geom_MultiPoint_);
|
||||
expect(obj).to.be.a(MultiPoint);
|
||||
expect(obj.getCoordinates()).to.eql([[10, 20, 0, 1], [20, 30, 0, 1]]);
|
||||
expect(obj.getLayout()).to.eql('XYZM');
|
||||
});
|
||||
@@ -872,14 +872,14 @@ describe('ol.format.EsriJSON', function() {
|
||||
});
|
||||
|
||||
it('encodes multipoint', function() {
|
||||
var multipoint = new _ol_geom_MultiPoint_([[102.0, 0.0], [103.0, 1.0]]);
|
||||
var multipoint = new MultiPoint([[102.0, 0.0], [103.0, 1.0]]);
|
||||
var esrijson = format.writeGeometry(multipoint);
|
||||
expect(multipoint.getCoordinates()).to.eql(
|
||||
format.readGeometry(esrijson).getCoordinates());
|
||||
});
|
||||
|
||||
it('encodes XYZ multipoint', function() {
|
||||
var multipoint = new _ol_geom_MultiPoint_([[102.0, 0.0, 3],
|
||||
var multipoint = new MultiPoint([[102.0, 0.0, 3],
|
||||
[103.0, 1.0, 4]], 'XYZ');
|
||||
var esrijson = format.writeGeometry(multipoint);
|
||||
expect(multipoint.getCoordinates()).to.eql(
|
||||
@@ -887,7 +887,7 @@ describe('ol.format.EsriJSON', function() {
|
||||
});
|
||||
|
||||
it('encodes XYM multipoint', function() {
|
||||
var multipoint = new _ol_geom_MultiPoint_([[102.0, 0.0, 3],
|
||||
var multipoint = new MultiPoint([[102.0, 0.0, 3],
|
||||
[103.0, 1.0, 4]], 'XYM');
|
||||
var esrijson = format.writeGeometry(multipoint);
|
||||
expect(multipoint.getCoordinates()).to.eql(
|
||||
@@ -895,7 +895,7 @@ describe('ol.format.EsriJSON', function() {
|
||||
});
|
||||
|
||||
it('encodes XYZM multipoint', function() {
|
||||
var multipoint = new _ol_geom_MultiPoint_([[102.0, 0.0, 3, 1],
|
||||
var multipoint = new MultiPoint([[102.0, 0.0, 3, 1],
|
||||
[103.0, 1.0, 4, 1]], 'XYZM');
|
||||
var esrijson = format.writeGeometry(multipoint);
|
||||
expect(multipoint.getCoordinates()).to.eql(
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ol_format_GML2_ from '../../../../src/ol/format/GML2.js';
|
||||
import _ol_geom_LineString_ from '../../../../src/ol/geom/LineString.js';
|
||||
import _ol_geom_LinearRing_ from '../../../../src/ol/geom/LinearRing.js';
|
||||
import _ol_geom_MultiLineString_ from '../../../../src/ol/geom/MultiLineString.js';
|
||||
import _ol_geom_MultiPoint_ from '../../../../src/ol/geom/MultiPoint.js';
|
||||
import MultiPoint from '../../../../src/ol/geom/MultiPoint.js';
|
||||
import _ol_geom_MultiPolygon_ from '../../../../src/ol/geom/MultiPolygon.js';
|
||||
import Point from '../../../../src/ol/geom/Point.js';
|
||||
import _ol_geom_Polygon_ from '../../../../src/ol/geom/Polygon.js';
|
||||
@@ -253,7 +253,7 @@ describe('ol.format.GML2', function() {
|
||||
' </layer>';
|
||||
|
||||
var feature = new _ol_Feature_({
|
||||
geometry: new _ol_geom_MultiPoint_([[1.1, 2]])
|
||||
geometry: new MultiPoint([[1.1, 2]])
|
||||
});
|
||||
feature.setId(1);
|
||||
var objectStack = [{
|
||||
@@ -724,7 +724,7 @@ describe('ol.format.GML3', function() {
|
||||
' </gml:pointMember>' +
|
||||
'</gml:MultiPoint>';
|
||||
var g = readGeometry(format, text);
|
||||
expect(g).to.be.an(_ol_geom_MultiPoint_);
|
||||
expect(g).to.be.an(MultiPoint);
|
||||
expect(g.getCoordinates()).to.eql([[1, 2, 0], [2, 3, 0], [3, 4, 0]]);
|
||||
var serialized = format.writeGeometryNode(g);
|
||||
expect(serialized.firstElementChild).to.xmleql(_ol_xml_.parse(text));
|
||||
@@ -747,7 +747,7 @@ describe('ol.format.GML3', function() {
|
||||
' </gml:pointMembers>' +
|
||||
'</gml:MultiPoint>';
|
||||
var g = readGeometry(format, text);
|
||||
expect(g).to.be.an(_ol_geom_MultiPoint_);
|
||||
expect(g).to.be.an(MultiPoint);
|
||||
expect(g.getCoordinates()).to.eql([[1, 2, 0], [2, 3, 0], [3, 4, 0]]);
|
||||
});
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import _ol_geom_GeometryCollection_ from '../../../../src/ol/geom/GeometryCollec
|
||||
import _ol_geom_LineString_ from '../../../../src/ol/geom/LineString.js';
|
||||
import _ol_geom_LinearRing_ from '../../../../src/ol/geom/LinearRing.js';
|
||||
import _ol_geom_MultiLineString_ from '../../../../src/ol/geom/MultiLineString.js';
|
||||
import _ol_geom_MultiPoint_ from '../../../../src/ol/geom/MultiPoint.js';
|
||||
import MultiPoint from '../../../../src/ol/geom/MultiPoint.js';
|
||||
import _ol_geom_MultiPolygon_ from '../../../../src/ol/geom/MultiPolygon.js';
|
||||
import Point from '../../../../src/ol/geom/Point.js';
|
||||
import _ol_geom_Polygon_ from '../../../../src/ol/geom/Polygon.js';
|
||||
@@ -948,7 +948,7 @@ describe('ol.format.KML', function() {
|
||||
var f = fs[0];
|
||||
expect(f).to.be.an(_ol_Feature_);
|
||||
var g = f.getGeometry();
|
||||
expect(g).to.be.an(_ol_geom_MultiPoint_);
|
||||
expect(g).to.be.an(MultiPoint);
|
||||
expect(g.getCoordinates()).to.eql([[1, 2, 3], [4, 5, 6]]);
|
||||
expect(g.get('extrude')).to.be.an('array');
|
||||
expect(g.get('extrude')).to.have.length(2);
|
||||
@@ -962,7 +962,7 @@ describe('ol.format.KML', function() {
|
||||
|
||||
it('can write MultiPoint geometries', function() {
|
||||
var layout = 'XYZ';
|
||||
var multiPoint = new _ol_geom_MultiPoint_(
|
||||
var multiPoint = new MultiPoint(
|
||||
[[1, 2, 3], [4, 5, 6]], layout);
|
||||
var features = [new _ol_Feature_(multiPoint)];
|
||||
var node = format.writeFeaturesNode(features);
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ol_format_WFS_ from '../../../../src/ol/format/WFS.js';
|
||||
import _ol_format_filter_ from '../../../../src/ol/format/filter.js';
|
||||
import _ol_geom_LineString_ from '../../../../src/ol/geom/LineString.js';
|
||||
import _ol_geom_MultiLineString_ from '../../../../src/ol/geom/MultiLineString.js';
|
||||
import _ol_geom_MultiPoint_ from '../../../../src/ol/geom/MultiPoint.js';
|
||||
import MultiPoint from '../../../../src/ol/geom/MultiPoint.js';
|
||||
import _ol_geom_MultiPolygon_ from '../../../../src/ol/geom/MultiPolygon.js';
|
||||
import _ol_geom_Polygon_ from '../../../../src/ol/geom/Polygon.js';
|
||||
import {transform} from '../../../../src/ol/proj.js';
|
||||
@@ -864,14 +864,14 @@ describe('ol.format.WFS', function() {
|
||||
it('creates the correct transaction body', function() {
|
||||
var format = new _ol_format_WFS_();
|
||||
var insertFeature = new _ol_Feature_({
|
||||
the_geom: new _ol_geom_MultiPoint_([[1, 2]]),
|
||||
the_geom: new MultiPoint([[1, 2]]),
|
||||
foo: 'bar',
|
||||
nul: null
|
||||
});
|
||||
insertFeature.setGeometryName('the_geom');
|
||||
var inserts = [insertFeature];
|
||||
var updateFeature = new _ol_Feature_({
|
||||
the_geom: new _ol_geom_MultiPoint_([[1, 2]]),
|
||||
the_geom: new MultiPoint([[1, 2]]),
|
||||
foo: 'bar',
|
||||
// null value gets Property element with no Value
|
||||
nul: null,
|
||||
@@ -978,14 +978,14 @@ describe('ol.format.WFS', function() {
|
||||
it('do not add feature prefix twice', function() {
|
||||
var format = new _ol_format_WFS_();
|
||||
var insertFeature = new _ol_Feature_({
|
||||
the_geom: new _ol_geom_MultiPoint_([[1, 2]]),
|
||||
the_geom: new MultiPoint([[1, 2]]),
|
||||
foo: 'bar',
|
||||
nul: null
|
||||
});
|
||||
insertFeature.setGeometryName('the_geom');
|
||||
var inserts = [insertFeature];
|
||||
var updateFeature = new _ol_Feature_({
|
||||
the_geom: new _ol_geom_MultiPoint_([[1, 2]]),
|
||||
the_geom: new MultiPoint([[1, 2]]),
|
||||
foo: 'bar',
|
||||
// null value gets Property element with no Value
|
||||
nul: null,
|
||||
@@ -1063,14 +1063,14 @@ describe('ol.format.WFS', function() {
|
||||
it('handles 3D in WFS 1.1.0', function() {
|
||||
var format = new _ol_format_WFS_();
|
||||
var insertFeature = new _ol_Feature_({
|
||||
the_geom: new _ol_geom_MultiPoint_([[1, 2, 3]]),
|
||||
the_geom: new MultiPoint([[1, 2, 3]]),
|
||||
foo: 'bar',
|
||||
nul: null
|
||||
});
|
||||
insertFeature.setGeometryName('the_geom');
|
||||
var inserts = [insertFeature];
|
||||
var updateFeature = new _ol_Feature_({
|
||||
the_geom: new _ol_geom_MultiPoint_([[1, 2, 3]]),
|
||||
the_geom: new MultiPoint([[1, 2, 3]]),
|
||||
foo: 'bar',
|
||||
// null value gets Property element with no Value
|
||||
nul: null,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as _ol_extent_ from '../../../../src/ol/extent.js';
|
||||
import _ol_geom_MultiPoint_ from '../../../../src/ol/geom/MultiPoint.js';
|
||||
import MultiPoint from '../../../../src/ol/geom/MultiPoint.js';
|
||||
import Point from '../../../../src/ol/geom/Point.js';
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ describe('ol.geom.MultiPoint', function() {
|
||||
|
||||
it('can be constructed with a null geometry', function() {
|
||||
expect(function() {
|
||||
return new _ol_geom_MultiPoint_(null);
|
||||
return new MultiPoint(null);
|
||||
}).not.to.throwException();
|
||||
});
|
||||
|
||||
@@ -15,7 +15,7 @@ describe('ol.geom.MultiPoint', function() {
|
||||
|
||||
var multiPoint;
|
||||
beforeEach(function() {
|
||||
multiPoint = new _ol_geom_MultiPoint_([]);
|
||||
multiPoint = new MultiPoint([]);
|
||||
});
|
||||
|
||||
it('defaults to layout XY', function() {
|
||||
@@ -51,7 +51,7 @@ describe('ol.geom.MultiPoint', function() {
|
||||
|
||||
var multiPoint;
|
||||
beforeEach(function() {
|
||||
multiPoint = new _ol_geom_MultiPoint_([[1, 2], [3, 4]]);
|
||||
multiPoint = new MultiPoint([[1, 2], [3, 4]]);
|
||||
});
|
||||
|
||||
it('has the expected layout', function() {
|
||||
@@ -92,7 +92,7 @@ describe('ol.geom.MultiPoint', function() {
|
||||
|
||||
var multiPoint;
|
||||
beforeEach(function() {
|
||||
multiPoint = new _ol_geom_MultiPoint_([[1, 2, 3], [4, 5, 6]]);
|
||||
multiPoint = new MultiPoint([[1, 2, 3], [4, 5, 6]]);
|
||||
});
|
||||
|
||||
it('has the expected layout', function() {
|
||||
@@ -121,7 +121,7 @@ describe('ol.geom.MultiPoint', function() {
|
||||
|
||||
var multiPoint;
|
||||
beforeEach(function() {
|
||||
multiPoint = new _ol_geom_MultiPoint_(
|
||||
multiPoint = new MultiPoint(
|
||||
[[1, 2, 3], [4, 5, 6]], 'XYM');
|
||||
});
|
||||
|
||||
@@ -171,7 +171,7 @@ describe('ol.geom.MultiPoint', function() {
|
||||
|
||||
var multiPoint;
|
||||
beforeEach(function() {
|
||||
multiPoint = new _ol_geom_MultiPoint_([[1, 2, 3, 4], [5, 6, 7, 8]]);
|
||||
multiPoint = new MultiPoint([[1, 2, 3, 4], [5, 6, 7, 8]]);
|
||||
});
|
||||
|
||||
it('has the expected layout', function() {
|
||||
@@ -208,21 +208,21 @@ describe('ol.geom.MultiPoint', function() {
|
||||
describe('#scale()', function() {
|
||||
|
||||
it('scales a multi-point', function() {
|
||||
var geom = new _ol_geom_MultiPoint_([[-10, -20], [10, 20]]);
|
||||
var geom = new MultiPoint([[-10, -20], [10, 20]]);
|
||||
geom.scale(10);
|
||||
var coordinates = geom.getCoordinates();
|
||||
expect(coordinates).to.eql([[-100, -200], [100, 200]]);
|
||||
});
|
||||
|
||||
it('accepts sx and sy', function() {
|
||||
var geom = new _ol_geom_MultiPoint_([[-10, -20], [10, 20]]);
|
||||
var geom = new MultiPoint([[-10, -20], [10, 20]]);
|
||||
geom.scale(2, 3);
|
||||
var coordinates = geom.getCoordinates();
|
||||
expect(coordinates).to.eql([[-20, -60], [20, 60]]);
|
||||
});
|
||||
|
||||
it('accepts an anchor', function() {
|
||||
var geom = new _ol_geom_MultiPoint_([[-10, -20], [10, 20]]);
|
||||
var geom = new MultiPoint([[-10, -20], [10, 20]]);
|
||||
geom.scale(3, 2, [-10, -20]);
|
||||
var coordinates = geom.getCoordinates();
|
||||
expect(coordinates).to.eql([[-10, -20], [50, 60]]);
|
||||
@@ -234,7 +234,7 @@ describe('ol.geom.MultiPoint', function() {
|
||||
|
||||
var multi, transform;
|
||||
beforeEach(function() {
|
||||
multi = new _ol_geom_MultiPoint_([[1, 2], [3, 4]]);
|
||||
multi = new MultiPoint([[1, 2], [3, 4]]);
|
||||
transform = sinon.spy();
|
||||
});
|
||||
|
||||
@@ -271,10 +271,10 @@ describe('ol.geom.MultiPoint', function() {
|
||||
describe('#transform()', function() {
|
||||
|
||||
it('transforms a geometry given CRS identifiers', function() {
|
||||
var multi = new _ol_geom_MultiPoint_([[-111, 45], [111, -45]]).transform(
|
||||
var multi = new MultiPoint([[-111, 45], [111, -45]]).transform(
|
||||
'EPSG:4326', 'EPSG:3857');
|
||||
|
||||
expect(multi).to.be.a(_ol_geom_MultiPoint_);
|
||||
expect(multi).to.be.a(MultiPoint);
|
||||
|
||||
var coords = multi.getCoordinates();
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import _ol_events_condition_ from '../../../../src/ol/events/condition.js';
|
||||
import _ol_geom_Circle_ from '../../../../src/ol/geom/Circle.js';
|
||||
import _ol_geom_LineString_ from '../../../../src/ol/geom/LineString.js';
|
||||
import _ol_geom_MultiLineString_ from '../../../../src/ol/geom/MultiLineString.js';
|
||||
import _ol_geom_MultiPoint_ from '../../../../src/ol/geom/MultiPoint.js';
|
||||
import MultiPoint from '../../../../src/ol/geom/MultiPoint.js';
|
||||
import _ol_geom_MultiPolygon_ from '../../../../src/ol/geom/MultiPolygon.js';
|
||||
import Point from '../../../../src/ol/geom/Point.js';
|
||||
import _ol_geom_Polygon_ from '../../../../src/ol/geom/Polygon.js';
|
||||
@@ -249,7 +249,7 @@ describe('ol.interaction.Draw', function() {
|
||||
var features = source.getFeatures();
|
||||
expect(features).to.have.length(1);
|
||||
var geometry = features[0].getGeometry();
|
||||
expect(geometry).to.be.a(_ol_geom_MultiPoint_);
|
||||
expect(geometry).to.be.a(MultiPoint);
|
||||
expect(geometry.getCoordinates()).to.eql([[30, -15]]);
|
||||
});
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import _ol_geom_Circle_ from '../../../../../src/ol/geom/Circle.js';
|
||||
import _ol_geom_GeometryCollection_ from '../../../../../src/ol/geom/GeometryCollection.js';
|
||||
import _ol_geom_LineString_ from '../../../../../src/ol/geom/LineString.js';
|
||||
import _ol_geom_MultiLineString_ from '../../../../../src/ol/geom/MultiLineString.js';
|
||||
import _ol_geom_MultiPoint_ from '../../../../../src/ol/geom/MultiPoint.js';
|
||||
import MultiPoint from '../../../../../src/ol/geom/MultiPoint.js';
|
||||
import _ol_geom_MultiPolygon_ from '../../../../../src/ol/geom/MultiPolygon.js';
|
||||
import Point from '../../../../../src/ol/geom/Point.js';
|
||||
import _ol_geom_Polygon_ from '../../../../../src/ol/geom/Polygon.js';
|
||||
@@ -101,7 +101,7 @@ describe('ol.render.canvas.Immediate', function() {
|
||||
var context = new _ol_render_canvas_Immediate_(getMockContext(), 1, extent);
|
||||
sinon.spy(context, 'drawMultiPoint');
|
||||
|
||||
var geometry = new _ol_geom_MultiPoint_([[1, 2], [3, 4]]);
|
||||
var geometry = new MultiPoint([[1, 2], [3, 4]]);
|
||||
context.drawGeometry(geometry);
|
||||
expect(context.drawMultiPoint.calledOnce).to.be(true);
|
||||
expect(context.drawMultiPoint.firstCall.calledWithExactly(geometry)).to.be(true);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ol_geom_MultiPoint_ from '../../../../../src/ol/geom/MultiPoint.js';
|
||||
import MultiPoint from '../../../../../src/ol/geom/MultiPoint.js';
|
||||
import Point from '../../../../../src/ol/geom/Point.js';
|
||||
import _ol_render_webgl_ImageReplay_ from '../../../../../src/ol/render/webgl/ImageReplay.js';
|
||||
import _ol_style_Image_ from '../../../../../src/ol/style/Image.js';
|
||||
@@ -127,7 +127,7 @@ describe('ol.render.webgl.ImageReplay', function() {
|
||||
it('sets the buffer data', function() {
|
||||
var multiPoint;
|
||||
|
||||
multiPoint = new _ol_geom_MultiPoint_(
|
||||
multiPoint = new MultiPoint(
|
||||
[[1000, 2000], [2000, 3000]]);
|
||||
replay.drawMultiPoint(multiPoint, null);
|
||||
expect(replay.vertices).to.have.length(64);
|
||||
@@ -145,7 +145,7 @@ describe('ol.render.webgl.ImageReplay', function() {
|
||||
expect(replay.indices[10]).to.be(6);
|
||||
expect(replay.indices[11]).to.be(7);
|
||||
|
||||
multiPoint = new _ol_geom_MultiPoint_(
|
||||
multiPoint = new MultiPoint(
|
||||
[[3000, 4000], [4000, 5000]]);
|
||||
replay.drawMultiPoint(multiPoint, null);
|
||||
expect(replay.vertices).to.have.length(128);
|
||||
|
||||
@@ -3,7 +3,7 @@ import _ol_geom_Circle_ from '../../../../../src/ol/geom/Circle.js';
|
||||
import _ol_geom_GeometryCollection_ from '../../../../../src/ol/geom/GeometryCollection.js';
|
||||
import _ol_geom_LineString_ from '../../../../../src/ol/geom/LineString.js';
|
||||
import _ol_geom_MultiLineString_ from '../../../../../src/ol/geom/MultiLineString.js';
|
||||
import _ol_geom_MultiPoint_ from '../../../../../src/ol/geom/MultiPoint.js';
|
||||
import MultiPoint from '../../../../../src/ol/geom/MultiPoint.js';
|
||||
import _ol_geom_MultiPolygon_ from '../../../../../src/ol/geom/MultiPolygon.js';
|
||||
import Point from '../../../../../src/ol/geom/Point.js';
|
||||
import _ol_geom_Polygon_ from '../../../../../src/ol/geom/Polygon.js';
|
||||
@@ -30,7 +30,7 @@ describe('ol.render.webgl.Immediate', function() {
|
||||
line = new _ol_geom_LineString_([[0, 0], [5, 5]]);
|
||||
multiLine = new _ol_geom_MultiLineString_([[[0, 0], [5, 5]]]);
|
||||
point = new Point([0, 0]);
|
||||
multiPoint = new _ol_geom_MultiPoint_([[0, 0]]);
|
||||
multiPoint = new MultiPoint([[0, 0]]);
|
||||
polygon = new _ol_geom_Polygon_([[[0, 0], [5, 5], [5, 0], [0, 0]]]);
|
||||
multiPolygon = new _ol_geom_MultiPolygon_([[[[0, 0], [5, 5], [5, 0], [0, 0]]]]);
|
||||
});
|
||||
|
||||
@@ -3,7 +3,7 @@ import _ol_Feature_ from '../../../../../src/ol/Feature.js';
|
||||
import _ol_geom_GeometryCollection_ from '../../../../../src/ol/geom/GeometryCollection.js';
|
||||
import _ol_geom_LineString_ from '../../../../../src/ol/geom/LineString.js';
|
||||
import _ol_geom_MultiLineString_ from '../../../../../src/ol/geom/MultiLineString.js';
|
||||
import _ol_geom_MultiPoint_ from '../../../../../src/ol/geom/MultiPoint.js';
|
||||
import MultiPoint from '../../../../../src/ol/geom/MultiPoint.js';
|
||||
import _ol_geom_MultiPolygon_ from '../../../../../src/ol/geom/MultiPolygon.js';
|
||||
import Point from '../../../../../src/ol/geom/Point.js';
|
||||
import _ol_geom_Polygon_ from '../../../../../src/ol/geom/Polygon.js';
|
||||
@@ -230,7 +230,7 @@ describe('ol.render.canvas.ReplayGroup', function() {
|
||||
}
|
||||
});
|
||||
var point = new _ol_Feature_(new Point([45, 90]));
|
||||
var multipoint = new _ol_Feature_(new _ol_geom_MultiPoint_(
|
||||
var multipoint = new _ol_Feature_(new MultiPoint(
|
||||
[[45, 90], [90, 45]]));
|
||||
var linestring = new _ol_Feature_(new _ol_geom_LineString_(
|
||||
[[45, 90], [45, 45], [90, 45]]));
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ol_geom_LineString_ from '../../../../src/ol/geom/LineString.js';
|
||||
import Point from '../../../../src/ol/geom/Point.js';
|
||||
import _ol_geom_Polygon_ from '../../../../src/ol/geom/Polygon.js';
|
||||
import _ol_geom_MultiLineString_ from '../../../../src/ol/geom/MultiLineString.js';
|
||||
import _ol_geom_MultiPoint_ from '../../../../src/ol/geom/MultiPoint.js';
|
||||
import MultiPoint from '../../../../src/ol/geom/MultiPoint.js';
|
||||
import _ol_geom_MultiPolygon_ from '../../../../src/ol/geom/MultiPolygon.js';
|
||||
import _ol_render_canvas_ReplayGroup_ from '../../../../src/ol/render/canvas/ReplayGroup.js';
|
||||
import _ol_renderer_vector_ from '../../../../src/ol/renderer/vector.js';
|
||||
@@ -86,7 +86,7 @@ describe('ol.renderer.vector', function() {
|
||||
});
|
||||
|
||||
it('does not render the multipoint', function() {
|
||||
feature.setGeometry(new _ol_geom_MultiPoint_([[0, 0], [1, 1]]));
|
||||
feature.setGeometry(new MultiPoint([[0, 0], [1, 1]]));
|
||||
var imageReplay = replayGroup.getReplay(
|
||||
style.getZIndex(), 'Image');
|
||||
var setImageStyleSpy = sinon.spy(imageReplay, 'setImageStyle');
|
||||
|
||||
@@ -7,7 +7,7 @@ import _ol_format_WKT_ from '../../../src/ol/format/WKT.js';
|
||||
import _ol_geom_GeometryCollection_ from '../../../src/ol/geom/GeometryCollection.js';
|
||||
import _ol_geom_LineString_ from '../../../src/ol/geom/LineString.js';
|
||||
import _ol_geom_MultiLineString_ from '../../../src/ol/geom/MultiLineString.js';
|
||||
import _ol_geom_MultiPoint_ from '../../../src/ol/geom/MultiPoint.js';
|
||||
import MultiPoint from '../../../src/ol/geom/MultiPoint.js';
|
||||
import Point from '../../../src/ol/geom/Point.js';
|
||||
import _ol_proj_EPSG4326_ from '../../../src/ol/proj/EPSG4326.js';
|
||||
|
||||
@@ -118,7 +118,7 @@ describe('ol.Sphere.getLength()', function() {
|
||||
geometry: new Point([0, 0]),
|
||||
length: 0
|
||||
}, {
|
||||
geometry: new _ol_geom_MultiPoint_([[0, 0], [1, 1]]),
|
||||
geometry: new MultiPoint([[0, 0], [1, 1]]),
|
||||
length: 0
|
||||
}, {
|
||||
geometry: new _ol_geom_LineString_([
|
||||
|
||||
Reference in New Issue
Block a user