Rename _ol_geom_MultiLineString_ to MultiLineString
This commit is contained in:
@@ -3,7 +3,7 @@ import * as _ol_extent_ from '../../../../src/ol/extent.js';
|
||||
import _ol_format_EsriJSON_ from '../../../../src/ol/format/EsriJSON.js';
|
||||
import 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 MultiLineString from '../../../../src/ol/geom/MultiLineString.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';
|
||||
@@ -192,7 +192,7 @@ describe('ol.format.EsriJSON', function() {
|
||||
var feature = format.readFeature(multiLineStringEsriJSON);
|
||||
expect(feature).to.be.an(_ol_Feature_);
|
||||
var geometry = feature.getGeometry();
|
||||
expect(geometry).to.be.an(_ol_geom_MultiLineString_);
|
||||
expect(geometry).to.be.an(MultiLineString);
|
||||
expect(geometry.getCoordinates()).to.eql([
|
||||
[[102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]],
|
||||
[[105.0, 3.0], [106.0, 4.0], [107.0, 3.0], [108.0, 4.0]]
|
||||
@@ -487,7 +487,7 @@ describe('ol.format.EsriJSON', function() {
|
||||
]]
|
||||
});
|
||||
var obj = format.readGeometry(str);
|
||||
expect(obj).to.be.a(_ol_geom_MultiLineString_);
|
||||
expect(obj).to.be.a(MultiLineString);
|
||||
expect(obj.getCoordinates()).to.eql([
|
||||
[[102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]],
|
||||
[[105.0, 3.0], [106.0, 4.0], [107.0, 3.0], [108.0, 4.0]]
|
||||
@@ -505,7 +505,7 @@ describe('ol.format.EsriJSON', function() {
|
||||
]]
|
||||
});
|
||||
var obj = format.readGeometry(str);
|
||||
expect(obj).to.be.a(_ol_geom_MultiLineString_);
|
||||
expect(obj).to.be.a(MultiLineString);
|
||||
expect(obj.getCoordinates()).to.eql([
|
||||
[[102.0, 0.0, 1], [103.0, 1.0, 1], [104.0, 0.0, 1], [105.0, 1.0, 1]],
|
||||
[[105.0, 3.0, 1], [106.0, 4.0, 1], [107.0, 3.0, 1], [108.0, 4.0, 1]]
|
||||
@@ -523,7 +523,7 @@ describe('ol.format.EsriJSON', function() {
|
||||
]]
|
||||
});
|
||||
var obj = format.readGeometry(str);
|
||||
expect(obj).to.be.a(_ol_geom_MultiLineString_);
|
||||
expect(obj).to.be.a(MultiLineString);
|
||||
expect(obj.getCoordinates()).to.eql([
|
||||
[[102.0, 0.0, 1], [103.0, 1.0, 1], [104.0, 0.0, 1], [105.0, 1.0, 1]],
|
||||
[[105.0, 3.0, 1], [106.0, 4.0, 1], [107.0, 3.0, 1], [108.0, 4.0, 1]]
|
||||
@@ -542,7 +542,7 @@ describe('ol.format.EsriJSON', function() {
|
||||
]]
|
||||
});
|
||||
var obj = format.readGeometry(str);
|
||||
expect(obj).to.be.a(_ol_geom_MultiLineString_);
|
||||
expect(obj).to.be.a(MultiLineString);
|
||||
expect(obj.getCoordinates()).to.eql([
|
||||
[[102, 0, 1, 2], [103, 1, 1, 2], [104, 0, 1, 2], [105, 1, 1, 2]],
|
||||
[[105, 3, 1, 2], [106, 4, 1, 2], [107, 3, 1, 2], [108, 4, 1, 2]]
|
||||
@@ -903,7 +903,7 @@ describe('ol.format.EsriJSON', function() {
|
||||
});
|
||||
|
||||
it('encodes multilinestring', function() {
|
||||
var multilinestring = new _ol_geom_MultiLineString_([
|
||||
var multilinestring = new MultiLineString([
|
||||
[[102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]],
|
||||
[[105.0, 3.0], [106.0, 4.0], [107.0, 3.0], [108.0, 4.0]]
|
||||
]);
|
||||
@@ -913,7 +913,7 @@ describe('ol.format.EsriJSON', function() {
|
||||
});
|
||||
|
||||
it('encodes XYZ multilinestring', function() {
|
||||
var multilinestring = new _ol_geom_MultiLineString_([
|
||||
var multilinestring = new MultiLineString([
|
||||
[[102.0, 0.0, 1], [103.0, 1.0, 2], [104.0, 0.0, 3], [105.0, 1.0, 4]],
|
||||
[[105.0, 3.0, 1], [106.0, 4.0, 2], [107.0, 3.0, 3], [108.0, 4.0, 4]]
|
||||
], 'XYZ');
|
||||
@@ -923,7 +923,7 @@ describe('ol.format.EsriJSON', function() {
|
||||
});
|
||||
|
||||
it('encodes XYM multilinestring', function() {
|
||||
var multilinestring = new _ol_geom_MultiLineString_([
|
||||
var multilinestring = new MultiLineString([
|
||||
[[102.0, 0.0, 1], [103.0, 1.0, 2], [104.0, 0.0, 3], [105.0, 1.0, 4]],
|
||||
[[105.0, 3.0, 1], [106.0, 4.0, 2], [107.0, 3.0, 3], [108.0, 4.0, 4]]
|
||||
], 'XYM');
|
||||
@@ -933,7 +933,7 @@ describe('ol.format.EsriJSON', function() {
|
||||
});
|
||||
|
||||
it('encodes XYZM multilinestring', function() {
|
||||
var multilinestring = new _ol_geom_MultiLineString_([
|
||||
var multilinestring = new MultiLineString([
|
||||
[[102.0, 0.0, 1, 0], [103.0, 1.0, 2, 2], [104.0, 0.0, 3, 1],
|
||||
[105.0, 1.0, 4, 2]],
|
||||
[[105.0, 3.0, 1, 0], [106.0, 4.0, 2, 1], [107.0, 3.0, 3, 1],
|
||||
|
||||
@@ -3,7 +3,7 @@ import _ol_format_GML_ from '../../../../src/ol/format/GML.js';
|
||||
import _ol_format_GML2_ from '../../../../src/ol/format/GML2.js';
|
||||
import 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 MultiLineString from '../../../../src/ol/geom/MultiLineString.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';
|
||||
@@ -284,7 +284,7 @@ describe('ol.format.GML2', function() {
|
||||
' </layer>';
|
||||
|
||||
var feature = new _ol_Feature_({
|
||||
geometry: new _ol_geom_MultiLineString_([[[1.1, 2], [3, 4.2]]])
|
||||
geometry: new MultiLineString([[[1.1, 2], [3, 4.2]]])
|
||||
});
|
||||
feature.setId(1);
|
||||
var objectStack = [{
|
||||
@@ -771,7 +771,7 @@ describe('ol.format.GML3', function() {
|
||||
' </gml:lineStringMember>' +
|
||||
'</gml:MultiLineString>';
|
||||
var g = readGeometry(format, text);
|
||||
expect(g).to.be.an(_ol_geom_MultiLineString_);
|
||||
expect(g).to.be.an(MultiLineString);
|
||||
expect(g.getCoordinates()).to.eql(
|
||||
[[[1, 2, 0], [2, 3, 0]], [[3, 4, 0], [4, 5, 0]]]);
|
||||
format = new _ol_format_GML_({srsName: 'CRS:84', multiCurve: false});
|
||||
@@ -793,7 +793,7 @@ describe('ol.format.GML3', function() {
|
||||
' </gml:lineStringMembers>' +
|
||||
'</gml:MultiLineString>';
|
||||
var g = readGeometry(format, text);
|
||||
expect(g).to.be.an(_ol_geom_MultiLineString_);
|
||||
expect(g).to.be.an(MultiLineString);
|
||||
expect(g.getCoordinates()).to.eql(
|
||||
[[[1, 2, 0], [2, 3, 0]], [[3, 4, 0], [4, 5, 0]]]);
|
||||
});
|
||||
@@ -916,7 +916,7 @@ describe('ol.format.GML3', function() {
|
||||
' </gml:curveMember>' +
|
||||
'</gml:MultiCurve>';
|
||||
var g = readGeometry(format, text);
|
||||
expect(g).to.be.an(_ol_geom_MultiLineString_);
|
||||
expect(g).to.be.an(MultiLineString);
|
||||
expect(g.getCoordinates()).to.eql(
|
||||
[[[1, 2, 0], [2, 3, 0]], [[3, 4, 0], [4, 5, 0]]]);
|
||||
var serialized = format.writeGeometryNode(g);
|
||||
@@ -947,7 +947,7 @@ describe('ol.format.GML3', function() {
|
||||
' </gml:curveMember>' +
|
||||
'</gml:MultiCurve>';
|
||||
var g = readGeometry(format, text);
|
||||
expect(g).to.be.an(_ol_geom_MultiLineString_);
|
||||
expect(g).to.be.an(MultiLineString);
|
||||
expect(g.getCoordinates()).to.eql(
|
||||
[[[1, 2, 0], [2, 3, 0]], [[3, 4, 0], [4, 5, 0]]]);
|
||||
format = new _ol_format_GML_({srsName: 'CRS:84', curve: true});
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import _ol_Feature_ from '../../../../src/ol/Feature.js';
|
||||
import _ol_format_GPX_ from '../../../../src/ol/format/GPX.js';
|
||||
import LineString from '../../../../src/ol/geom/LineString.js';
|
||||
import _ol_geom_MultiLineString_ from '../../../../src/ol/geom/MultiLineString.js';
|
||||
import MultiLineString from '../../../../src/ol/geom/MultiLineString.js';
|
||||
import Point from '../../../../src/ol/geom/Point.js';
|
||||
import _ol_geom_Polygon_ from '../../../../src/ol/geom/Polygon.js';
|
||||
import {get as getProjection, transform} from '../../../../src/ol/proj.js';
|
||||
@@ -162,7 +162,7 @@ describe('ol.format.GPX', function() {
|
||||
var f = fs[0];
|
||||
expect(f).to.be.an(_ol_Feature_);
|
||||
var g = f.getGeometry();
|
||||
expect(g).to.be.an(_ol_geom_MultiLineString_);
|
||||
expect(g).to.be.an(MultiLineString);
|
||||
expect(g.getCoordinates()).to.eql([]);
|
||||
expect(g.getLayout()).to.be('XY');
|
||||
});
|
||||
@@ -218,7 +218,7 @@ describe('ol.format.GPX', function() {
|
||||
var f = fs[0];
|
||||
expect(f).to.be.an(_ol_Feature_);
|
||||
var g = f.getGeometry();
|
||||
expect(g).to.be.an(_ol_geom_MultiLineString_);
|
||||
expect(g).to.be.an(MultiLineString);
|
||||
expect(g.getCoordinates()).to.eql([[]]);
|
||||
expect(g.getLayout()).to.be('XY');
|
||||
var serialized = format.writeFeaturesNode(fs);
|
||||
@@ -249,7 +249,7 @@ describe('ol.format.GPX', function() {
|
||||
var f = fs[0];
|
||||
expect(f).to.be.an(_ol_Feature_);
|
||||
var g = f.getGeometry();
|
||||
expect(g).to.be.an(_ol_geom_MultiLineString_);
|
||||
expect(g).to.be.an(MultiLineString);
|
||||
expect(g.getCoordinates()).to.eql([
|
||||
[[2, 1, 3, 1263115752], [6, 5, 7, 1263115812]]
|
||||
]);
|
||||
@@ -284,7 +284,7 @@ describe('ol.format.GPX', function() {
|
||||
var f = fs[0];
|
||||
expect(f).to.be.an(_ol_Feature_);
|
||||
var g = f.getGeometry();
|
||||
expect(g).to.be.an(_ol_geom_MultiLineString_);
|
||||
expect(g).to.be.an(MultiLineString);
|
||||
var p1 = transform([2, 1], 'EPSG:4326', 'EPSG:3857');
|
||||
p1.push(3, 1263115752);
|
||||
var p2 = transform([6, 5], 'EPSG:4326', 'EPSG:3857');
|
||||
@@ -331,7 +331,7 @@ describe('ol.format.GPX', function() {
|
||||
var f = fs[0];
|
||||
expect(f).to.be.an(_ol_Feature_);
|
||||
var g = f.getGeometry();
|
||||
expect(g).to.be.an(_ol_geom_MultiLineString_);
|
||||
expect(g).to.be.an(MultiLineString);
|
||||
expect(g.getCoordinates()).to.eql([
|
||||
[[2, 1, 3, 1263115752], [6, 5, 7, 1263115812]],
|
||||
[[9, 8, 10, 1263115872], [12, 11, 13, 1263115932]]
|
||||
|
||||
@@ -5,7 +5,7 @@ import _ol_format_KML_ from '../../../../src/ol/format/KML.js';
|
||||
import _ol_geom_GeometryCollection_ from '../../../../src/ol/geom/GeometryCollection.js';
|
||||
import 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 MultiLineString from '../../../../src/ol/geom/MultiLineString.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';
|
||||
@@ -1008,7 +1008,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_MultiLineString_);
|
||||
expect(g).to.be.an(MultiLineString);
|
||||
expect(g.getCoordinates()).to.eql(
|
||||
[[[1, 2, 3], [4, 5, 6]], [[7, 8, 9], [10, 11, 12]]]);
|
||||
expect(g.get('extrude')).to.be.an('array');
|
||||
@@ -1027,7 +1027,7 @@ describe('ol.format.KML', function() {
|
||||
|
||||
it('can write MultiLineString geometries', function() {
|
||||
var layout = 'XYZ';
|
||||
var multiLineString = new _ol_geom_MultiLineString_(
|
||||
var multiLineString = new MultiLineString(
|
||||
[[[1, 2, 3], [4, 5, 6]], [[7, 8, 9], [10, 11, 12]]], layout);
|
||||
var features = [new _ol_Feature_(multiLineString)];
|
||||
var node = format.writeFeaturesNode(features);
|
||||
@@ -1289,7 +1289,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_MultiLineString_);
|
||||
expect(g).to.be.an(MultiLineString);
|
||||
var gs = g.getLineStrings();
|
||||
expect(gs).to.have.length(2);
|
||||
expect(gs[0]).to.be.an(LineString);
|
||||
|
||||
@@ -3,7 +3,7 @@ import _ol_format_GML2_ from '../../../../src/ol/format/GML2.js';
|
||||
import _ol_format_WFS_ from '../../../../src/ol/format/WFS.js';
|
||||
import _ol_format_filter_ from '../../../../src/ol/format/filter.js';
|
||||
import LineString from '../../../../src/ol/geom/LineString.js';
|
||||
import _ol_geom_MultiLineString_ from '../../../../src/ol/geom/MultiLineString.js';
|
||||
import MultiLineString from '../../../../src/ol/geom/MultiLineString.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';
|
||||
@@ -697,7 +697,7 @@ describe('ol.format.WFS', function() {
|
||||
it('creates the correct srsName', function() {
|
||||
var format = new _ol_format_WFS_();
|
||||
var insertFeature = new _ol_Feature_({
|
||||
the_geom: new _ol_geom_MultiLineString_([[
|
||||
the_geom: new MultiLineString([[
|
||||
[-5178372.1885436, 1992365.7775042],
|
||||
[-4434792.7774889, 1601008.1927386],
|
||||
[-4043435.1927233, 2148908.8114105]
|
||||
@@ -729,7 +729,7 @@ describe('ol.format.WFS', function() {
|
||||
var format = new _ol_format_WFS_();
|
||||
var updateFeature = new _ol_Feature_();
|
||||
updateFeature.setGeometryName('the_geom');
|
||||
updateFeature.setGeometry(new _ol_geom_MultiLineString_([[
|
||||
updateFeature.setGeometry(new MultiLineString([[
|
||||
[-12279454, 6741885],
|
||||
[-12064207, 6732101],
|
||||
[-11941908, 6595126],
|
||||
@@ -748,7 +748,7 @@ describe('ol.format.WFS', function() {
|
||||
|
||||
it('creates the correct update if geometry name is alias', function() {
|
||||
var format = new _ol_format_WFS_();
|
||||
var updateFeature = new _ol_Feature_(new _ol_geom_MultiLineString_([[
|
||||
var updateFeature = new _ol_Feature_(new MultiLineString([[
|
||||
[-12279454, 6741885],
|
||||
[-12064207, 6732101],
|
||||
[-11941908, 6595126],
|
||||
@@ -774,7 +774,7 @@ describe('ol.format.WFS', function() {
|
||||
var format = new _ol_format_WFS_();
|
||||
var updateFeature = new _ol_Feature_();
|
||||
updateFeature.setGeometryName('the_geom');
|
||||
updateFeature.setGeometry(new _ol_geom_MultiLineString_([[
|
||||
updateFeature.setGeometry(new MultiLineString([[
|
||||
[-12279454, 6741885],
|
||||
[-12064207, 6732101],
|
||||
[-11941908, 6595126],
|
||||
@@ -797,7 +797,7 @@ describe('ol.format.WFS', function() {
|
||||
var format = new _ol_format_WFS_();
|
||||
var updateFeature = new _ol_Feature_();
|
||||
updateFeature.setGeometryName('the_geom');
|
||||
updateFeature.setGeometry(new _ol_geom_MultiLineString_([[
|
||||
updateFeature.setGeometry(new MultiLineString([[
|
||||
[-12279454, 6741885],
|
||||
[-12064207, 6732101],
|
||||
[-11941908, 6595126],
|
||||
@@ -830,14 +830,14 @@ describe('ol.format.WFS', function() {
|
||||
var format = new _ol_format_WFS_();
|
||||
var updateFeature = new _ol_Feature_();
|
||||
updateFeature.setGeometryName('the_geom');
|
||||
updateFeature.setGeometry(new _ol_geom_MultiLineString_([[
|
||||
updateFeature.setGeometry(new MultiLineString([[
|
||||
[-12279454, 6741885],
|
||||
[-12064207, 6732101],
|
||||
[-11941908, 6595126],
|
||||
[-12240318, 6507071],
|
||||
[-12416429, 6604910]
|
||||
]]));
|
||||
updateFeature.set('geom2', new _ol_geom_MultiLineString_([[
|
||||
updateFeature.set('geom2', new MultiLineString([[
|
||||
[-12000000, 6700000],
|
||||
[-12000001, 6700001],
|
||||
[-12000002, 6700002]
|
||||
|
||||
Reference in New Issue
Block a user