Point detection feature

Implemented the functionality for point detection after a polygon is drawn.