diff --git a/src/Parser/GeoJsonParser.js b/src/Parser/GeoJsonParser.js index 129271a52f..ee6e06c2ed 100644 --- a/src/Parser/GeoJsonParser.js +++ b/src/Parser/GeoJsonParser.js @@ -136,7 +136,10 @@ function jsonFeatureToFeature(crsIn, crsOut, json, filteringExtent, options, col // copy other properties for (const key of Object.keys(json)) { if (!keyProperties.includes(key.toLowerCase())) { - properties[key] = json[key]; + // create `geojson` key if it does not exist yet + properties.geojson = properties.geojson || {}; + // add key defined property to `geojson` property + properties.geojson[key] = json[key]; } } diff --git a/test/functional/source_stream_wfs_25d.js b/test/functional/source_stream_wfs_25d.js index 3d40539f7a..e113077fa8 100644 --- a/test/functional/source_stream_wfs_25d.js +++ b/test/functional/source_stream_wfs_25d.js @@ -13,7 +13,7 @@ describe('source_stream_wfs_25d', function _() { it('should pick the correct building', async () => { // test picking const buildingId = await page.evaluate(() => picking({ x: 97, y: 213 })); - assert.equal(buildingId.id, 'bati_indifferencie.5266051'); + assert.equal(buildingId.geojson.id, 'bati_indifferencie.5266051'); }); it('should remove GeometryLayer', async () => { const countGeometryLayerStart = await page.evaluate(() => view.getLayers(l => l.isGeometryLayer).length);