react-native-leaflet icon indicating copy to clipboard operation
react-native-leaflet copied to clipboard

Get onMapClicked event data

Open kelvencsouza opened this issue 2 years ago • 2 comments

Please, how can I get onMapClicked event data to dynamically change the position of the marker according to the user's click on the screen over the map?

kelvencsouza avatar Aug 22 '22 02:08 kelvencsouza

You can use the onMessageReceived prop inside the LeafletView instance to capture events. From there on you can add your own code to handle each event as you please.

Caipe97 avatar Nov 28 '22 20:11 Caipe97

like this onMessageReceived={() => { //code }}

loloide avatar Feb 17 '23 20:02 loloide