onPolygonClick

onPolygonClick

The callback function passed here handles clicks on user-defined polygons. See addPolygon for documentation on creating polygons.

Parameter:

  • callback (function): A callback function to execute. It will be passed the following:

    • polygon (object): The polygon clicked.

Returns: Nothing

Code Sample