Leaflet:: How to check point lies inside/outside of polygon or rectangle

user2446592 picture user2446592 · Jun 3, 2013 · Viewed 23.9k times · Source

is there is any algorithm to check marker lies inside or outside of Polygon, Rectangle and circle. I tried to write a function using this link. but no success.

Answer

Thesane picture Thesane · Aug 15, 2013

there is a function in leaflet to check this.

Polygon.getBounds().contains(MarketLatLng);