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

Consider the map boundaries #25

Closed
jeromecaffaro opened this issue Jun 30, 2013 · 0 comments
Closed

Consider the map boundaries #25

jeromecaffaro opened this issue Jun 30, 2013 · 0 comments

Comments

@jeromecaffaro
Copy link
Contributor

There is a possibility to define map boundaries in Leaflet (maxBounds option), such that the user cannot pan outside some defined area. It would be interesting to catch the cases when the location is outside the map boundaries, and offer the developer an option to not set the view to this location.

jeromecaffaro added a commit to jeromecaffaro/leaflet-locatecontrol that referenced this issue Jun 30, 2013
When the map has defined boundaries (maxBounds), do not move
to the location if it is outside the boundaries.
Added "onLocationOutsideMapBounds" option to trigger a callback
and customize the behaviour. By default move is aborted and
message from newly defined "options.strings.outsideMapBoundsMsg"
is displayed. Fixes domoritz#25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant