Read GeoJSON feature id

This commit is contained in:
Tom Payne
2013-11-11 19:14:02 +01:00
parent 8edefc3fee
commit 8626da50ea

View File

@@ -96,6 +96,7 @@ ol.format.GeoJSON.readFeature_ = function(object, callback, opt_obj) {
goog.asserts.assert(goog.isDef(geometryReader));
var geometry = geometryReader(feature.geometry);
var f = new ol.Feature(geometry);
f.setId(feature.id);
if (goog.isDef(feature.properties)) {
f.setValues(feature.properties);
}