added oneshot callback (trigger, then stop) when location is found
Thanks for the updates. Why is this functionality required to be inside the plugin rather than something controlled from the outside (by listening to location updates on the map and then calling stop on the plugin)?
I'm not the OP but I also came here looking for this functionality.
In my case, I'm using React, and I'd like to have more fine-grained control over the panning/zoom when the user's location is found, panning to a viewRect which encompasses both their location and also a target marker for their destination.
Because leaflet-locatecontrol does not expose the native event, I'd need to add a second custom component inside <MapContainer> simply to hook into this event and pass it up to the parent.