Physical motion tracking on Live Mapview in Iphone sdk?

I want to track the movement of a person on a map in my iphone. I use mapview, which shows the current location of the user, as well as another output that denotes the location of other persons, say person A. I want to track the person. Physical movement on my iphone frame. This means that if person A moves from one place to another, the icon or pin that indicates the location of person A must move from one place to another on the map on my iphone. I want to track a person. Live traffic on mapview.Is this possible? If yes, please explain how? Please, help.

+6
source share
1 answer

This is not difficult. I assume that you are using a server that will exchange data between two devices. In this case, when person A moves, you can update the coordinates of your location on your server. You can get the coordinates of your location using

- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation 

delegate method. At the same time, you can get the coordinates of the personโ€™s location from the server and update the map. The pin will move. Just set the pin lowering animation to NO.

0
source

Source: https://habr.com/ru/post/903670/


All Articles