react-here-map
react-here-map copied to clipboard
How to change marker position without creating a new one?
I am trying to change marker location. The expected behavior is to change the same marker position but in the example code, when lat and lon is changed, a new marker is created at that location on the map. How can I achieve that the current icon on the map is positioned according to the new coordinates?
` <HMapMarker
coords={{ lat: lat, lng: lon }}
options={{}}
setViewBounds={false}
icon={MarkerIcon("#28ef1c", true)}
/>`