GLMapUserLocation
Objective-C
@interface GLMapUserLocation : NSObject <CLLocationManagerDelegate>
Swift
class GLMapUserLocation : NSObject, CLLocationManagerDelegate
Helper class that displays the user’s current location.
To display the user’s location using GLMapUserLocation, create your own CLLocationManager and set GLMapUserLocation as the manager’s delegate.
Alternatively, forward -locationManager:didUpdateLocations: calls from your existing location manager delegate to GLMapUserLocation.
-
Initializes with default images
user_location.svganduser_movement.svgfrom the application resources.Declaration
Objective-C
- (instancetype _Nullable)initWithDrawOrder:(int32_t)drawOrder;Swift
init?(drawOrder: Int32)Parameters
drawOrderDraw order of images.
-
Initializes with custom images.
Declaration
Objective-C
- (nonnull instancetype)initWithDrawOrder:(int32_t)drawOrder locationImage:(nonnull PlatformImage *)locationImage movementImage: (nonnull PlatformImage *)movementImage;Swift
init(drawOrder: Int32, locationImage: NSImage, movementImage: NSImage)Parameters
drawOrderDraw order of images.
locationImageUser location image (used when the user is stationary).
movementImageUser movement image (used when movement is detected).
-
The last location received by
GLMapUserLocation.Declaration
Objective-C
@property (readonly) CLLocation *_Nullable lastLocation;Swift
var lastLocation: CLLocation? { get } -
Image used when no movement is detected.
Declaration
Objective-C
@property (readonly) GLMapImage *_Nonnull locationImage;Swift
var locationImage: GLMapImage { get } -
Image used when movement is detected.
Declaration
Objective-C
@property (readonly) GLMapImage *_Nonnull movementImage;Swift
var movementImage: GLMapImage { get } -
Accuracy circle layer.
Declaration
Objective-C
@property (readonly) GLMapVectorLayer *_Nonnull accuracyCircle;Swift
var accuracyCircle: GLMapVectorLayer { get }
Install in Dash