react-here-map icon indicating copy to clipboard operation
react-here-map copied to clipboard

How to change marker position without creating a new one?

Open akaribrahim opened this issue 3 years ago • 0 comments

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)} 
           />`

akaribrahim avatar Apr 30 '21 16:04 akaribrahim