Add ol.geom.MultiPolygon#getSimplifiedGeometryInternal
This commit is contained in:
@@ -10,6 +10,30 @@ describe('ol.geom.MultiPolygon', function() {
|
||||
}).not.to.throwException();
|
||||
});
|
||||
|
||||
describe('with a simple MultiPolygon', function() {
|
||||
|
||||
var multiPolygon;
|
||||
beforeEach(function() {
|
||||
multiPolygon = new ol.geom.MultiPolygon([
|
||||
[[[0, 0], [0, 2], [1, 1], [2, 0]]],
|
||||
[[[3, 0], [4, 1], [5, 2], [5, 0]]]
|
||||
]);
|
||||
});
|
||||
|
||||
describe('#getSimplifiedGeometry', function() {
|
||||
|
||||
it('returns the expected result', function() {
|
||||
var simplifiedGeometry = multiPolygon.getSimplifiedGeometry(1);
|
||||
expect(simplifiedGeometry).to.be.an(ol.geom.MultiPolygon);
|
||||
expect(simplifiedGeometry.getCoordinates()).to.eql([
|
||||
[[[0, 0], [0, 2], [2, 0]]],
|
||||
[[[3, 0], [5, 2], [5, 0]]]
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user