Loose implementation of fast markers to load upwards of 30k markers #1481
Replies: 4 comments 2 replies
-
Hi @jesussmile, This certainly looks promising, however we can't really accept it into the core at this time. The best option is probably to make a plugin. It's just like making a normal package, but with a few more steps for us to add it to the plugins catalogue. See https://docs.fleaflet.dev/plugins/making-a-plugin for more details. Once you've got a working package and some good documentation, I'd be happy to add it to the list. Thanks for your contribution, happy to help more if you need it. |
Beta Was this translation helpful? Give feedback.
-
hi @JaffaKetchup 20230405-194839-gwq730eh_c7X3O9OH.mp4 |
Beta Was this translation helpful? Give feedback.
-
Ah I see, I was also thinking the same .. that Draw method is actually expensive, let me try with an svg asset and come back to you. Thank you for the tip. |
Beta Was this translation helpful? Give feedback.
-
20230406_004240-VidRotate.mp4I guess my work is complete with it. I got the markers to load without much lag. Definitely better than the default markers in terms of speed. Yes you can use a child widget like svg assets etc. Tried it. Works. But I prefer to draw on canvas. |
Beta Was this translation helpful? Give feedback.
-
Hi Guys,
based off of https://github.com/KanarekApp/flutter_map_fast_markers I have written a new
MarkerX
class that can load huge number of marker points and show them on the map. In my example i am using a QuadTree to better sort the markers and using the bounds of the visible screen to populate the markers. simple logic and the draw on canvas feature that the original author uses (for now) [ will try with prebuilt markers in future]Initially I tried to use zoom and populate markers based off of it but It would only do so where my screen was visible when i scrolled up down right left.. nothing.[ there is a markerzoom class if you want to try it out]
So, I decided to go with bounds instead.
I feel it's doing a good job, surely will lag a bit when it has 30k markers in memory, However I am not sure if its just a placebo or is actually working, upto you guys to tell.
I have tried it with few markers may be 5000, works smooth.
Apologies, my knowledge is limited and this is as far as I could go, hopefully one of you can look into this matter and let us know if this is any good ?
If it works i would like to create a plugin.
Never created a plugin so.. yeah!. Hopefully to learn from one of you on how to do it ?
If its similar to what we have now with the default marker, please disregards. Just a poor attempt I guess..
If not then cool .. just wanted to contribute.. :P
There are two options to check in the drop down menu,
1.short waypoint around 5000 markers
2.Long waypoint around 30000 markers
this is the repo, feel free to try https://github.com/jesussmile/markerx
Untitled.mp4
20230405_140629.mp4
Note- I dont know anyting about PR or how to incorporate it, so.. if you make one tell me what to do next .. haha.
Beta Was this translation helpful? Give feedback.
All reactions