Or you can use a geometric solution. You must store / manage the map / item geometry. For example, a list of shapes, such as circles, rectangles.
Perhaps triangles or ellipses if you have a lot of time. Saying that a triangle has a point or not is a mathematical issue and can be numerically unstable if the triangle is very thin (the algorithm has division). . Fix: How to determine if a point is in a two-dimensional triangle?
I voted for abc.
Notinlist
source share