-
Notifications
You must be signed in to change notification settings - Fork 39
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
ability to set max and min width, height #4
Comments
I agree, that would be really nice. Unfortunately, I don't think I'll have the time to implement any time soon. I'd be happy to accept pull requests though. |
I can have a look if I have some time in the coming weeks On Mon, May 5, 2014 at 4:44 PM, Jonatan Heyman [email protected]:
|
That'd be great! On Mon, May 5, 2014 at 10:45 PM, Liam Horne [email protected]:
|
Sounds great any updates on this? |
I haven't tackled this sorry, I was using this for a bit on a project I'm working on but switched to Leaflet Draw for my particular need and so just haven't needed to extend this functionality. |
Okay thanks anyway for your quick reply. So basically there are two events that have to be considered when limiting the size of an area:
Next step: How to handle this? It would be great to limit the size in square degrees because OpenStreetMap is limiting requests to their API with fixed area sizes in square degrees (e.g. Notes API 25 square degrees). Normally you would do that with (sin(maxlat)-sin(minlat)) * (maxlon-minlon). But the OSM backend simplifies this by removing the trigonometric functions, so it's just (maxlat-minlat)*(maxlon-minlon). Like this:
|
As the title says. Essentially my goal is to create rectangles that are limited on size in sq. km for example no rectangle greater than 900 sq. km.
However in this case limiting the zoom level and then also limiting this to say 500px would work great
The text was updated successfully, but these errors were encountered: