iOS 显示UserLocation和UserTracking示例
示例
这将在映射上显示用户位置
目标C
[self.map setShowsUserLocation:YES];
迅速
self.map?.showsUserLocation = true
这将跟踪用户在映射上的位置,并根据
目标C
[self.map setUserTrackingMode:MKUserTrackingModeFollow];
迅速
self.map?.userTrackingMode = .follow
这将在映射上显示用户位置
[self.map setShowsUserLocation:YES];
self.map?.showsUserLocation = true
这将跟踪用户在映射上的位置,并根据
[self.map setUserTrackingMode:MKUserTrackingModeFollow];
self.map?.userTrackingMode = .follow