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:
@@ -129,6 +129,9 @@ ol.parser.GeoJSON.prototype.parseFeature_ = function(json, opt_options) {
|
||||
geometry = null,
|
||||
options = opt_options || {};
|
||||
var feature = new ol.Feature(json.properties);
|
||||
if (goog.isDef(json.id)) {
|
||||
feature.setFeatureId(json.id);
|
||||
}
|
||||
if (geomJson) {
|
||||
var type = geomJson.type;
|
||||
var callback = options.callback;
|
||||
|
||||
Reference in New Issue
Block a user