map-gl-utils icon indicating copy to clipboard operation
map-gl-utils copied to clipboard

TypeError: Converting circular structure to JSON occurs when using any map-gl-utils with mapbox-gl v3.6.0

Open jparish3 opened this issue 1 year ago • 2 comments

mapbox-gl.js?v=be7c18f5:26206 Uncaught (in promise) TypeError: Converting circular structure to JSON --> starting at object with constructor 'Object' --- property 'data' closes the circle at JSON.stringify () at Ia._getGlobalId (mapbox-gl.js?v=be7c18f5:26206:40) at Ia._diffStyle (mapbox-gl.js?v=be7c18f5:26209:34) at Map.setStyle (mapbox-gl.js?v=be7c18f5:29935:320) at MapGlUtils.addSource (map-gl-utils.js?v=be7c18f5:489:14) at MapGlUtils.addGeoJSONSource (map-gl-utils.js?v=be7c18f5:474:17) at MapGlUtils.addGeoJSON (map-gl-utils.js?v=be7c18f5:484:17) at map-styles.js:106:11 at callWithErrorHandling (chunk-YPSMCZO7.js?v=be7c18f5:1663:19) at callWithAsyncErrorHandling (chunk-YPSMCZO7.js?v=be7c18f5:1670:17)

jparish3 avatar Aug 29 '24 01:08 jparish3

I have this too. It looks like style.sources[id] = sourceDef as part of addSource(id, sourceDef)

pete-volantautonomy avatar Sep 04 '24 13:09 pete-volantautonomy

I haven't come across this, do you have a repro case?

stevage avatar Jan 21 '25 11:01 stevage