Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rendering over 1000 markers using React Map GL

I am experiencing a problem with rendering large amount of markers. Each marker is displayed as a SVG. Everything is fine until the number of markers increases to more than 1000. The map start lagging and there is delay when zoom in or zoom out, even moving the map. As I saw from this post: Stylable marker/feature in react-mapbox-gl?

Is there any other methods that I can render and interact smoothly without changing from react-map-gl to react-mapbox-gl? Because Feature component does not exist in react-map-gl.

Thanks for answering my question.

like image 969
khang nguyen Avatar asked Jul 09 '26 02:07

khang nguyen


1 Answers

There are optimizations described here for rendering large numbers of markers and zooming/panning: https://github.com/visgl/react-map-gl/issues/750

like image 184
ArchbishopLolly Avatar answered Jul 13 '26 18:07

ArchbishopLolly



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!