I have an API that returns an array of latitudes and longitudes that define the boundaries of an area on a map(polygon).
In my react-native app, I have react-native-maps installed. How do I check if the user's location is in the polygon returned by the api?
I know this can be achieved with google maps web with the containsLocation()
function. Does a function like that exist for react-native-maps
?
isPointInPolygon(point, polygon)
– Donoghue