Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add Leaflet Controls to position based on user or marker aggregate #41

Open
fpapado opened this issue Jul 12, 2019 · 1 comment

Comments

@fpapado
Copy link
Owner

fpapado commented Jul 12, 2019

Having every addition to the map call setView() seems silly in terms of performance, and I also worry that we are relying on browser timing when we do that. I wonder if MutationObserver allows us to run a command after each action has completed.

@fpapado
Copy link
Owner Author

fpapado commented Jul 12, 2019

This turned out to be tricky, because the mutations are only done processing after the aggregate of children nodes has been added. We could track those with a Promise (initialChildrenLoads), but I'm a bit wary of the complexity. Perhaps a better feature is to add controls for the user, in the form of Geolocation and Marker buttons.

@fpapado fpapado changed the title Improvement: Batch map.setView() after the mutations are processed Feature: Add Leaflet Controls to position based on user or marker aggregate Jul 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant