mapbox-gl-js icon indicating copy to clipboard operation
mapbox-gl-js copied to clipboard

Dynamic sources can't display GeoJSON correctly

Open zxwild opened this issue 11 months ago • 4 comments

Hi, I noticed it's impossible to use dynamic sources, due to corrupted GeoJSON features display.

Latest maplibre version (3.8.0) and chrome version (131) are used.

map.addSource('main', {
  dynamic: true,  // when "dynamic: false" is used all is OK
  type: 'geojson',
  data: {}
});

Almost all features I tried to display looks like this: Screenshot_20241212_164804

Here is a demo, you can switch "dynamic" and see the difference. https://codepen.io/qwioefsd/pen/zxOKjrZ

zxwild avatar Dec 12 '24 10:12 zxwild

same for me

instantgis avatar Dec 15 '24 14:12 instantgis

same for me

dimayzy avatar Apr 01 '25 11:04 dimayzy

same for me And I can't use updateData. https://docs.mapbox.com/mapbox-gl-js/api/sources/#geojsonsource#updatedata

gtsl-2 avatar Apr 02 '25 15:04 gtsl-2

One up for this issue

dailyprice avatar May 01 '25 05:05 dailyprice

This is still an issue, it appears to be a problem with fills and lines that span over multiple map tiles for any dynamic source. It will appear differently depending on your zoom level. With that in mind it shows up very consistently at high zoom levels. Here is a screen with a line and polygon drawn from the same source.

Image

demiacle avatar Nov 10 '25 21:11 demiacle