Rename {get|set}FeatureId to {get|set}Id
This commit is contained in:
@@ -712,16 +712,16 @@ describe('ol.expr.lib', function() {
|
||||
describe('fid()', function() {
|
||||
|
||||
var one = new ol.Feature();
|
||||
one.setFeatureId('one');
|
||||
one.setId('one');
|
||||
|
||||
var two = new ol.Feature();
|
||||
two.setFeatureId('two');
|
||||
two.setId('two');
|
||||
|
||||
var three = new ol.Feature();
|
||||
three.setFeatureId('three');
|
||||
three.setId('three');
|
||||
|
||||
var four = new ol.Feature();
|
||||
four.setFeatureId('four');
|
||||
four.setId('four');
|
||||
|
||||
var odd = parse('fid("one", "three")');
|
||||
var even = parse('fid("two", "four")');
|
||||
|
||||
@@ -18,8 +18,8 @@ describe('ol.Feature', function() {
|
||||
|
||||
it('can store the feature\'s commonly used id', function() {
|
||||
var feature = new ol.Feature();
|
||||
feature.setFeatureId('foo');
|
||||
expect(feature.getFeatureId()).to.be('foo');
|
||||
feature.setId('foo');
|
||||
expect(feature.getId()).to.be('foo');
|
||||
});
|
||||
|
||||
it('will set the default geometry', function() {
|
||||
|
||||
@@ -198,7 +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');
|
||||
expect(first.getId()).to.be('AFG');
|
||||
var firstGeom = first.getGeometry();
|
||||
expect(firstGeom).to.be.a(ol.geom.Polygon);
|
||||
expect(ol.extent.equals(firstGeom.getBounds(),
|
||||
@@ -208,7 +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');
|
||||
expect(last.getId()).to.be('ZWE');
|
||||
var lastGeom = last.getGeometry();
|
||||
expect(lastGeom).to.be.a(ol.geom.Polygon);
|
||||
expect(ol.extent.equals(lastGeom.getBounds(),
|
||||
|
||||
@@ -13,7 +13,7 @@ describe('ol.parser.KML', function() {
|
||||
expect(goog.dom.xml.loadXml(output)).to.xmleql(xml);
|
||||
expect(obj.features.length).to.eql(1);
|
||||
var geom = obj.features[0].getGeometry();
|
||||
expect(obj.features[0].getFeatureId()).to.eql('KML.Polygon');
|
||||
expect(obj.features[0].getId()).to.eql('KML.Polygon');
|
||||
expect(geom instanceof ol.geom.Polygon).to.be.ok();
|
||||
expect(geom.dimension).to.eql(3);
|
||||
done();
|
||||
@@ -90,7 +90,7 @@ describe('ol.parser.KML', function() {
|
||||
'itself \n at the height of the underlying terrain.';
|
||||
expect(obj.features[0].get('description')).to.eql(description);
|
||||
expect(obj.features[0].get('foo')).to.eql('bar');
|
||||
expect(obj.features[0].getFeatureId()).to.eql('foobarbaz');
|
||||
expect(obj.features[0].getId()).to.eql('foobarbaz');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -265,7 +265,7 @@ describe('ol.parser.gml_v2', function() {
|
||||
expect(feature.getGeometry() instanceof
|
||||
ol.geom.MultiPolygon).to.be.ok();
|
||||
var attributes = feature.getAttributes();
|
||||
expect(feature.getFeatureId()).to.eql('states.1');
|
||||
expect(feature.getId()).to.eql('states.1');
|
||||
expect(attributes['STATE_NAME']).to.eql('Illinois');
|
||||
expect(attributes['STATE_FIPS']).to.eql('17');
|
||||
expect(attributes['SUB_REGION']).to.eql('E N Cen');
|
||||
|
||||
@@ -306,7 +306,7 @@ describe('ol.parser.gml_v3', function() {
|
||||
expect(feature.getGeometry() instanceof
|
||||
ol.geom.MultiPolygon).to.be.ok();
|
||||
var attributes = feature.getAttributes();
|
||||
expect(feature.getFeatureId()).to.eql('states.1');
|
||||
expect(feature.getId()).to.eql('states.1');
|
||||
expect(attributes['STATE_NAME']).to.eql('Illinois');
|
||||
expect(attributes['STATE_FIPS']).to.eql('17');
|
||||
expect(attributes['SUB_REGION']).to.eql('E N Cen');
|
||||
@@ -326,7 +326,7 @@ describe('ol.parser.gml_v3', function() {
|
||||
expect(feature.getGeometry() instanceof
|
||||
ol.geom.MultiPolygon).to.be.ok();
|
||||
var attributes = feature.getAttributes();
|
||||
expect(feature.getFeatureId()).to.eql('states.1');
|
||||
expect(feature.getId()).to.eql('states.1');
|
||||
expect(attributes['STATE_NAME']).to.eql('Illinois');
|
||||
expect(attributes['STATE_FIPS']).to.eql('17');
|
||||
expect(attributes['SUB_REGION']).to.eql('E N Cen');
|
||||
|
||||
Reference in New Issue
Block a user