Track user with live location

Hi all,

Can any one help me. I want to implement the process of tracking user on the Map and to get their live location. Basically my idea is to track user as there are moving in the map. I have option of Origin as user’s current location but I don’t want to set any destination.

Hi,
If you want to show user location and then track it, try to add the following code, in the onMapReady method:

func onMapReady(_ mapView: TTMapView) {
    tomtomMap.isShowsUserLocation = true
    tomtomMap.trackingMode = TTUserTrackingMode.follow
}
3 Likes

@witkow_l Thank you so much… this is what I want… Thanks…

But I want to get user’s location when user moves… like we have method “didupdate userlocation” in default iOS map. Do we have any option like this which will provide me step by step location of user? so that I can maintain array of location tracked by user.

Thanks Again :slight_smile: