manuelbieh / geolib

Zero dependency library to provide some basic geo functions
MIT License
4.23k stars 341 forks source link

Check if point is inside bounds #241

Closed wobsoriano closed 4 years ago

wobsoriano commented 4 years ago

Hi, thanks for this. Say I have my bounds

{
  "maxLat": 14.499742516798863,
  "maxLng": 121.01984221863691,
  "minLat": 14.479583523055124,
  "minLng": 121.00984221678377,
}

Is there a way to check if a given lat and lng, is within these bounds? I saw isPointInPolygon method though I'm not sure if that is the right method to use.

Any help would be appreciated.