Instance Property

isUserLocationVisible

A Boolean value indicating whether the device’s current location is visible in the map view.

Declaration

var isUserLocationVisible: Bool { get }

Discussion

This property tells you whether the icon used to represent the user’s current location is visible in the map view. When determining whether the current location is visible, this property factors in the horizontal accuracy of the location data. Specifically, if the rectangle represented by the user’s current location plus or minus minus the horizontal accuracy of that location intersects the map’s visible rectangle, this property contains the value true. If that location rectangle does not intersect the map’s visible rectangle, this property contains the value false.

If the user’s location cannot be determined, this property contains the value false.

See Also

Displaying the User’s Location

var showsUserLocation: Bool

A Boolean value indicating whether the map should try to display the user’s location.

var userLocation: MKUserLocation

The annotation object representing the user’s current location.

var userTrackingMode: MKUserTrackingMode

The mode used to track the user location.

func setUserTrackingMode(MKUserTrackingMode, animated: Bool)

Sets the mode used to track the user location with optional animation.