Add ol.Feature#{get,set}Id
This commit is contained in:
@@ -24,6 +24,12 @@ ol.Feature = function(geometryOrValues) {
|
|||||||
|
|
||||||
goog.base(this);
|
goog.base(this);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
* @type {number|string|undefined}
|
||||||
|
*/
|
||||||
|
this.id_ = undefined;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {number}
|
* @type {number}
|
||||||
@@ -74,6 +80,14 @@ goog.exportProperty(
|
|||||||
ol.Feature.prototype.getGeometry);
|
ol.Feature.prototype.getGeometry);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return {number|string|undefined} Id.
|
||||||
|
*/
|
||||||
|
ol.Feature.prototype.getId = function() {
|
||||||
|
return this.id_;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {number} Revision.
|
* @return {number} Revision.
|
||||||
*/
|
*/
|
||||||
@@ -117,3 +131,11 @@ goog.exportProperty(
|
|||||||
ol.Feature.prototype,
|
ol.Feature.prototype,
|
||||||
'setGeometry',
|
'setGeometry',
|
||||||
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