0

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!

Kukeltje
  • 12,223
  • 4
  • 24
  • 47
Liverpool
  • 265
  • 7
  • 21
  • First find a solution to do this with pure google maps. Only if that is possible we can look at a 'primefaces' gmap related solution – Kukeltje Jan 11 '20 at 13:05
  • you have to play with javascript eventssssssss, try to do a function that is called when the button is pressed and record the user coordinates on document, heres an start up with mouse events https://stackoverflow.com/questions/6819045/onmousedrag-event-js – BugsForBreakfast Jan 11 '20 at 13:09

0 Answers0