volga-volga / react-native-yamap

React Native Yandex Maps | Яндекс Карты | Yandex.MapKit implementation for react native | YandexMaps
144 stars 80 forks source link

how to move marker using an array of points #197

Open anis-18 opened 1 year ago

anis-18 commented 1 year ago

how can i move a marker following an array of different points ?

  const points = [{ lat: 55.813622, lon: 49.104447 },
  { lat: 55.816554, lon: 49.111161 },
  { lat: 55.816598, lon: 49.116736 }]

the problem is that animatedMoveTo is not working when maping an array and it's not working when using useEffect, how can i move the marker automatically to the 3 point when he reached the second ? any solution ? is there any method to detect if marker reached following point ? like onAnimatedmoveEnd ?