diff --git a/src/ol/format/geojson/geojsonformat.js b/src/ol/format/geojson/geojsonformat.js index 710582c209..a3945f81f2 100644 --- a/src/ol/format/geojson/geojsonformat.js +++ b/src/ol/format/geojson/geojsonformat.js @@ -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); }