Store the feature's commonly used id
To not clobber the feature's attributes, this is a separate member property.
This commit is contained in:
@@ -16,6 +16,12 @@ describe('ol.Feature', function() {
|
||||
expect(feature.get('foo')).to.be('bar');
|
||||
});
|
||||
|
||||
it('can store the feature\'s commonly used id', function() {
|
||||
var feature = new ol.Feature();
|
||||
feature.setFeatureId('foo');
|
||||
expect(feature.getFeatureId()).to.be('foo');
|
||||
});
|
||||
|
||||
it('will set the default geometry', function() {
|
||||
var feature = new ol.Feature({
|
||||
loc: new ol.geom.Point([10, 20]),
|
||||
|
||||
Reference in New Issue
Block a user