Contents
How to set the maxbounds of a leaflet?
When you instantiate your Leaflet map, you just need to pass in a maxBounds option among your map options. When this option is set, the map restricts the view to the given geographical bounds, bouncing the user back when he tries to pan outside the view. To set the restriction dynamically, use setMaxBounds method.
Is there a workaround for leaflet imageoverlay?
The only workaround is to remove the existing imageOverlay and add a new one (which ruins the user experience as the map disappears then reappears each time the window is dragged or zoomed). The problem is just the async wait and the possible race conditions there, but should be easy to hack together, e.g.:
Why is my leaflet no longer aligned to imagebounds?
When dragging my map the imageOverlay url is updated correctly but my leaflet window is no longer aligned to the imageBound values that were set when first adding the imageOverlay which results in a skewed output (this is my assumption):
How to make your Leaflet map bounce back?
When you instantiate your Leaflet map, you just need to pass in a maxBounds option among your map options. When this option is set, the map restricts the view to the given geographical bounds, bouncing the user back when he tries to pan outside the view.
How to search OSM data by name and address?
I have it, Nominatim is a tool to search OSM data by name and address and to generate synthetic addresses of OSM points (reverse geocoding). http://nominatim.openstreetmap.org/search?q=135+pilkington+avenue,+birmingham&format=json&polygon=1&addressdetails=1
When to use latlngbounds in leaflet setting?
With respect to the custom coordinate system in use here, it might be useful to add something like this toward the end of your initialization code to get the current LatLngBounds values for your map right after it has loaded: Hopefully then, the console output will yield some clues as to how the coordinates should look.