Skip to content

Conversation

yohanboniface
Copy link
Member

The toBBoxString shortcut is very handy, but not all GIS support the "left,bottom,right,top" string.

So I figured that some left, bottom, right, top separate getters could be helpful.

See for example:

  • Notinatim viewbox is using left,top,right,bottom
  • JOSM remote listener expects separate left, bottom, right, top parameters
  • Overpass API is using "minimum lat, minimum lng, maximum lat, maximum lng" (which is bottom, left, top, right) bbox string

Added specs also.

In case you are OK to add it in Leaflet core, we will need to document it, which is not done at the moment.

Thanks!

Yohan

@mourner
Copy link
Member

mourner commented Jan 27, 2013

Sounds reasonable. I'm not sure about the top/bottom/left/right naming though, what do you think about making this north/south/west/east instead to be more consistent with other methods?

@yohanboniface
Copy link
Member Author

Agreed!

@yohanboniface
Copy link
Member Author

@mourner, can I do something to help here? :)

@mourner
Copy link
Member

mourner commented Feb 4, 2013

Nope, good to merge I think.

mourner added a commit that referenced this pull request Feb 4, 2013
Add LatLngBounds.getLeft/getBottom/getRight/getTop
@mourner mourner merged commit 80f107c into Leaflet:master Feb 4, 2013
@mourner
Copy link
Member

mourner commented Feb 4, 2013

Please make a docs update pull to gh-pages branch too.

@yohanboniface
Copy link
Member Author

I will!
(I'm travelling in boat for at least a week, so almost no Internet network, but I try to do it asap :) ).

@mourner
Copy link
Member

mourner commented Feb 4, 2013

There's no rush, enjoy your travel Yohan! Hope to have a beer with you on a boat some time :)

@yohanboniface
Copy link
Member Author

Still network, so: #1346 :)
You're very welcome for the beer :)

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.

2 participants