Hi , i have tried to find a object within a polygon area using the logic from the link you send.(http://www.geeksforgeeks.org/how-to-check-if-a-given-point-lies-inside-a-polygon/)
So i am using the method " isInside(polygon, n, p)" where polygon = points of polygon, n= number of segment and p = location of the node(point to check)
according to the image,
polygon: go.Point= [new go.Point(0,0),new go.Point(348,0), new go.Point(348,139) ,new go.Point(124,139) ,new go.Point(124, 107) ,new go.Point(0,107)]
n = 6 and
p = new go.Point(331,200) getting by node.location
So, from the image you can see the points of the node is not inside the polygon.
in diagram if i draw a Polygon in any location, always it start from (0,0) i.e. its point is calculating by different way from the node location point in gojs.
what is the solution of this?