maplibre / maplibre-gl-js

MapLibre GL JS - Interactive vector tile maps in the browser
https://maplibre.org/maplibre-gl-js/docs/
Other
6.14k stars 672 forks source link

updateData 'Cannot update source data after using updateData function for single feature' #2998

Open nmnblgl opened 11 months ago

nmnblgl commented 11 months ago

maplibre-gl-js version: 3.3.0

browser: Chrome Version 115.0.5790.170 (Official Build) (64-bit)

Steps to Trigger Behavior Create new source with a lot of features Add new feature in this source previously rendered call function const currentSource = this.map.getSource(sourceId); currentSource.updateData({ add: [newFeature] }); const newSource= this.map.getSource(sourceId);

Expected Behavior The new feature is showed in the map. And newSource is contained [newFeature].

Actual Behavior currentSource data and newSource data is same. I do not see new feature in any source

HarelM commented 11 months ago

A jsbin or codepen would be helpful...