1

I have the bounding box of a map in leaflet with map.getBounds() which returns the NorthEast LatLng and SouthWest LatLng. How do I get the minimum and maximum of bothLat and Lng from this bounding box. I needed to use this information to fetch all coordinates in my db that falls within these ranges.

  • map.getBounds() returns LatLngBounds object. See docs leafletjs.com/reference-1.5.0.html#latlngbounds how you can get rectangle bounds coordinates from it. – TomazicM Aug 28 '19 at 9:47
  • Welcome to GIS SE! We're a little different from other sites. We're a Q&A site, not a discussion forum. For questions that involve code we ask that you show us where you are stuck with your own code by including a code snippet in your question. There is an edit button beneath your question which will enable you to do that and a {} button that enables you to format any highlighted code nicely. Please check out our short tour for more about how the site works. Thanks. – PolyGeo Aug 28 '19 at 9:55

Browse other questions tagged or ask your own question.