Merge pull request #733 from ahocevar/fid

Store the feature's commonly used id. r=@fredj,@bartvde
This commit is contained in:
ahocevar
2013-05-24 06:15:00 -07:00
9 changed files with 51 additions and 2 deletions

View File

@@ -198,6 +198,7 @@ describe('ol.parser.GeoJSON', function() {
var first = result[0];
expect(first).to.be.a(ol.Feature);
expect(first.get('name')).to.be('Afghanistan');
expect(first.getFeatureId()).to.be('AFG');
var firstGeom = first.getGeometry();
expect(firstGeom).to.be.a(ol.geom.Polygon);
expect(ol.extent.equals(firstGeom.getBounds(),
@@ -207,6 +208,7 @@ describe('ol.parser.GeoJSON', function() {
var last = result[178];
expect(last).to.be.a(ol.Feature);
expect(last.get('name')).to.be('Zimbabwe');
expect(last.getFeatureId()).to.be('ZWE');
var lastGeom = last.getGeometry();
expect(lastGeom).to.be.a(ol.geom.Polygon);
expect(ol.extent.equals(lastGeom.getBounds(),