I use Leaflet draw maps on the frontend to draw polygons.
After polygons are drawn, I have array with coordinates (latitude, longitude) of these polygons.
In the end, I need to check on the backend (in offline mode), if given point (latitude, longitude) belongs to some polygon.
I understand, that it should be possible. But earth is a sphere, polygon lies down on the ground surface, and I have no idea how to do this.
How is it possible to check that?