Quantcast
Viewing latest article 1
Browse Latest Browse All 20

Add points to an exisiting route -> route invisble. Short move from user required

Hello

I want to track the user's location on a map. So I use

var route = {
   name:"your route",
   points:points,
   color:"blue",
  width:4
};
mapView.addRoute(route);
On every location change I just want to add the current location of the user.
route.points.push({latitude:e.coords.latitude,longitude:e.coords.longitude});
The content of the array is correct -> the new point is added properly, but the user can't see the route. He has to move the map shortly to view the route. There is a possibility to set regionFit to false and after 500ms again to true, but I don't think, it's a good solution, because the map automatically zooms and old iPhones will take more time than the iPhone 4.

Would be great, if someone knows how to fix it!

Thanks

Felix


Viewing latest article 1
Browse Latest Browse All 20

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>