Ability to specify geometryName on ol.format.GeoJSON

This commit is contained in:
Bart van den Eijnden
2014-05-21 16:41:35 +02:00
parent dca88668ab
commit 8eef633abc
3 changed files with 29 additions and 2 deletions

View File

@@ -174,6 +174,13 @@ describe('ol.format.GeoJSON', function() {
expect(features[2].getGeometry()).to.be.an(ol.geom.Polygon);
});
it('can create a feature with a specific geometryName', function() {
var feature = new ol.format.GeoJSON({geometryName: 'the_geom'}).
readFeature(pointGeoJSON);
expect(feature.getGeometryName()).to.be('the_geom');
expect(feature.getGeometry()).to.be.an(ol.geom.Point);
});
});
describe('#readFeatures', function() {