What is your question @chafa ? It is not necessary to develop your own pointInPolygon Procedure.
Developers can determine if a point (a latitude/longitude) is in a polygon using the advice here Location sensor (ringed fence / circular ringed fence).
For a circle:
DistanceToPoint( latitude , longitude , centroid )
Computes the distance between the Circle
and the given latitude
and longitude
. If centroids
is true
, the distance is computed from the center of the Circle
to the given point. Otherwise, the distance is computed from the closest point on the Circle
to the given point. Further, this method will return 0 if centroids
is false
and the point is in the Circle
. If an error occurs, -1 will be returned.
For a polygon:
DistanceToPoint( latitude , longitude , centroid )
Computes the distance between the Polygon
and the given latitude
and longitude
. If centroids
is true
, the distance is computed from the center of the Polygon
to the given point. Otherwise, the distance is computed from the closest point on the Polygon
to the given point. Further, this method will return 0 if centroids
is false
and the point is in the Polygon
. If an error occurs, -1 will be returned.
Said another way, if the centroid is set to false in the examples, 0 is returned using the Block if the point is in the Polygon.
see the Maps documentation Map components
Regards,
Steve