I read this article(https://www.primefaces.org/showcase/ui/data/gmap/polygons.xhtml) about making polygons with cordinates and add them as a layer on gmap,but how to make something like a button and when it is pressed the user can draw a polygon on the map and save it with it's cordinates.
I want the cordinates not to be hardcoded they must be taken when the user draw it on the map.
Thanks you a lot!