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 fit map to layer group #39

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Compufreak345
Copy link
Contributor

Added property fitMapToBounds to get the map automatically resized to fit the bounds of the LayerGroup where this is set to true (so enables functionality like fitToMarkers, but for only selected items). Random behaviour will occur if this is set on multiple elements, but I think it's quite useful anyways.

Contains the changes from pull-request #38 as well.

In my testcase the layer-group is still not displayed on the map, but at least it does not throw errors causing the map to not render anymore...
Added missing semicolon & <content></content> so children can actually be found.
leaflet-layer-group working
This property causes the map containing the Layer-Group to be automatically resized to fit the given container. Using more than one container with this set to true will probably cause random behaviour.
Needed for Firefox & Safari to work with dom-repeat.
Might be better to reregister the mutationObserver at the right point, but until now I did not see any issues.
Patch 1 - fix Safari & firefox issues
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

Successfully merging this pull request may close these issues.

1 participant