Pass the id field name as a new param

This commit is contained in:
Frederic Junod committed 2020-04-03 07:52:51 +02:00
1 parent d7c83e4651
commit 6522e6a17f
2 files changed
+12 -7

No files matched your search

+5
View File
@@ -97,6 +97,7 @@ describe('ol.format.EsriJSON', function() {
};
const featureCollectionEsriJSON = {
objectIdFieldName: 'prop0',
features: [pointEsriJSON, lineStringEsriJSON, polygonEsriJSON]
};
@@ -230,6 +231,10 @@ describe('ol.format.EsriJSON', function() {
expect(features[0].getGeometry()).to.be.an(Point);
expect(features[1].getGeometry()).to.be.an(LineString);
expect(features[2].getGeometry()).to.be.an(Polygon);
expect(features[0].getId()).to.eql('value0');
expect(features[1].getId()).to.eql('value0');
expect(features[2].getId()).to.eql('value0');
});
it('can read and transform a point', function() {