pavel-corsaghin / react-native-leaflet

A LeafletView component using WebView and Leaflet map for React Native applications
MIT License
99 stars 42 forks source link

Get onMapClicked event data #23

Open kelvencsouza opened 1 year ago

kelvencsouza commented 1 year ago

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?

Caipe97 commented 1 year ago

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.

loloide commented 1 year ago

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