Rename _ol_geom_MultiPoint_ to MultiPoint
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user