on-location event for capture-coordinates

I’m unable to fire on-location event for capture-coordinates component (I’ve tried on latest stable 4.82.4 and 4.83.0+rc5). The documentation is unhelpful.

It says for on-location event
A $: function that will be called when the user interacts (drag or zoom) with the map. The passed $value will contain the location data.
with the following example
<capture-coordinates bind="current_location" on-location="$:onLocation($value)"/>
But allow-zoom and allow-dragging are false be default, so there is no way to interact with the map.

Even if I add those settings like below:
<capture-coordinates bind="current_location" allow-zoom="true" allow-dragging="true" on-location="$:onLocation($value)"/>
Then it zooms and drags, but the event doesn’t fire.

What am I doing wrong?
Thanks in advance!

Hi @khilda

It appears that you have uncovered a regression, based on your code it should work as you expect. I will let you know as soon as we have fixed the issue.

Thanks for letting us know and sorry for the inconvenience.

The on-location event should only fire when a user clicks/taps on a point within the map. The documentation was indeed incorrect in this regard, and has since been corrected. The in-app behavior has also been corrected in runtime version 4.83.1.