setShowsUserLocation(_:)
Sets whether the map shows the user’s current location.
Declaration
func setShowsUserLocation(_ showsUserLocation: Bool)Parameters
- showsUserLocation:
A Boolean value that indicates whether the map shows the user’s current location.
Discussion
Setting this property to true displays the users current location on the map. The default value is false.
This property doesn’t indicate whether the user’s position is visible on the map. Setting this property to true causes the map view to use the Core Location framework to track the user’s current location and display the location when it’s visible on screen. To keep the map centered on the user’s location, pass WKInterfaceMap.UserTrackingMode.follow to the setUserTrackingMode(_:animated:) method.