diff --git a/src/ol/format/geojson.js b/src/ol/format/geojson.js index 998895881a..99a9750b96 100644 --- a/src/ol/format/geojson.js +++ b/src/ol/format/geojson.js @@ -329,7 +329,8 @@ ol.format.GeoJSON.GEOMETRY_WRITERS_ = { /** * Read a feature from a GeoJSON Feature source. Only works for Feature or * geometry types. Use {@link ol.format.GeoJSON#readFeatures} to read - * FeatureCollection source. + * FeatureCollection source. If feature at source has an id, it will be used + * as Feature id by calling {@link ol.Feature#setId} internally. * * @function * @param {Document|Node|Object|string} source Source. diff --git a/src/ol/source/vector.js b/src/ol/source/vector.js index e1e88b30cf..7706fa56fd 100644 --- a/src/ol/source/vector.js +++ b/src/ol/source/vector.js @@ -157,7 +157,9 @@ ol.inherits(ol.source.Vector, ol.source.Source); /** * Add a single feature to the source. If you want to add a batch of features * at once, call {@link ol.source.Vector#addFeatures source.addFeatures()} - * instead. + * instead. A feature will not be added to the source if feature with + * the same id is already there. The reason for this behavior is to avoid + * feature duplication when using bbox or tile loading strategies. * @param {ol.Feature} feature Feature to add. * @api */