Event "clicked"

The event is triggered whenever the left mouse button is released on the Maps Widget.

Synopsis

clicked(float lat, float lon, bool pan);

Parameters

Parameter Description
lat Latitude of the clicked position.
lon Longitude of the clicked position.
pan TRUE if the click was part of a pan operation, FALSE if it was a simple click.

Details

The event is triggered whenever the left mouse button is released, which means that it is triggered when clicking the map and when moving the map via panning. It provides the coordinates of the clicked position as well as an indication whether it was a pan or not.

clicked(float lat, float lon, bool pan)
{
  if (pan)
  DebugTN("panned at lat " + lat + " lon " + lon);
  else
  DebugTN("clicked at lat " + lat + " lon " + lon);
}

Assignment

Maps Widget