Issue with Setting Marker and Zoom Animation #9022
Replies: 1 comment 3 replies
-
Please make a vanilla demo to reproduce this issue: http://www.leafletjs.com/edit.html |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description:
I'm experiencing an issue with setting a marker and performing a zoom animation using
flyTo
in React Leaflet. I have two components: SearchBarMap and MainMap. TheSearchBarMap
component handles the search functionality and updates the selected address. TheMainMap
component displays the map, markers, and the selected address marker.The problem is that when I select an address from the search results, the marker is not set, and the zoom animation does not occur. However, I noticed that the
LocationMarker
component works perfectly fine and smoothly performs the zoom animation.Here's the relevant code for the
SearchBarMap
component:And here's the relevant code for the
MainMap
component:And here's the code for the
LocationMarker
component:I hope this helps to clarify the issue. If you have any further questions, feel free to ask!
Thanks in advance for your assistance!
Beta Was this translation helpful? Give feedback.
All reactions