Add ol.geom.Polygon#getLinearRing

This commit is contained in:
Tom Payne
2014-03-10 15:40:05 +01:00
parent 03911e6c6b
commit c2d4ffaba1
3 changed files with 22 additions and 0 deletions

View File

@@ -84,6 +84,11 @@ describe('ol.geom.Polygon', function() {
expect(polygon.getStride()).to.be(2);
});
it('can return individual rings', function() {
expect(polygon.getLinearRing(0).getCoordinates()).to.eql(outerRing);
expect(polygon.getLinearRing(1).getCoordinates()).to.eql(innerRing);
});
it('has the expected rings', function() {
var linearRings = polygon.getLinearRings();
expect(linearRings).to.be.an(Array);