Add ol.Feature#{get,set}Id

This commit is contained in:
Tom Payne
2013-11-11 19:13:04 +01:00
parent 0221fd2216
commit 30503f5665

View File

@@ -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;
};