Skip to content

How to render many markers in the most performant way #1497

Answered by JaffaKetchup
LamaAgent asked this question in Q&A
Discussion options

You must be logged in to vote

Hi there,
Markers are culled automatically - the are not rendered when off screen.
In terms of displaying at a certain zoom level, the MapController has a stream that can be listened to for events, such as changes in zooms. You can use this to control whether markers appear or not. You should filter the stream to include only events that you need to worry about, to avoid unnecessary state changes.
Also see https://docs.fleaflet.dev/plugins/list#marker-clustering.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@LamaAgent
Comment options

Answer selected by LamaAgent
Comment options

You must be logged in to vote
2 replies
@LamaAgent
Comment options

@ibrierley
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1496 on April 23, 2023 10:33.