Add ol.Feature#{get,set}Id
This commit is contained in:
@@ -24,6 +24,12 @@ ol.Feature = function(geometryOrValues) {
|
||||
|
||||
goog.base(this);
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {number|string|undefined}
|
||||
*/
|
||||
this.id_ = undefined;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {number}
|
||||
@@ -74,6 +80,14 @@ goog.exportProperty(
|
||||
ol.Feature.prototype.getGeometry);
|
||||
|
||||
|
||||
/**
|
||||
* @return {number|string|undefined} Id.
|
||||
*/
|
||||
ol.Feature.prototype.getId = function() {
|
||||
return this.id_;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {number} Revision.
|
||||
*/
|
||||
@@ -117,3 +131,11 @@ goog.exportProperty(
|
||||
ol.Feature.prototype,
|
||||
'setGeometry',
|
||||
ol.Feature.prototype.setGeometry);
|
||||
|
||||
|
||||
/**
|
||||
* @param {number|string|undefined} id Id.
|
||||
*/
|
||||
ol.Feature.prototype.setId = function(id) {
|
||||
this.id_ = id;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user