@interface DUXMapWidget : DUXWidget |
Header: | DUXMapWidget.h |
Inherits From: | DUXWidget |
Widget that displays the aircraft's state and information on the map this includes aircraft location, home location, aircraft trail path, aircraft heading, and No Fly Zones.
Preferred Aspect Ratio: 1:1
- (void)clearCurrentFlightPath |
Header: | DUXMapWidget.h |
Clears the flight path up to the current location. The flight path is removed even if it is hidden.
- (void)setFlyZoneOverlayColor:(nullable UIColor *)color |
Header: | DUXMapWidget.h |
Change the rendered color for a given fly zone category.
nullable UIColor * color | The desired color. |
DJIFlyZoneCategory category | The fly zone category for which the color would apply. |
- (void)setFlyZoneOverlayAlpha:(CGFloat)alpha |
Header: | DUXMapWidget.h |
Change the rendered alpha for a given fly zone category.
CGFloat alpha | The desired alpha. |
DJIFlyZoneCategory category | The fly zone category for which the alpha would apply. |
@property (nonatomic, assign) BOOL tapToUnlockEnabled |
Header: | DUXMapWidget.h |
Gets whether tap to unlock is enabled.
@property (nonatomic, assign) BOOL showDirectionToHome |
Header: | DUXMapWidget.h |
Defaults to NO
. A Boolean value indicating whether the map displays a line showing
the direction to home.
@property (nonatomic, assign) BOOL showFlightPath |
Header: | DUXMapWidget.h |
YES
if the flight path is visible. The default value is NO
@property (nonatomic, assign) BOOL showHomeAnnotation |
Header: | DUXMapWidget.h |
YES
if the map displays the home point of the aircraft. The default value of this property is YES
.
typedef NS_ENUM(NSUInteger, DUXMapAnnotationType) |
Header: | DUXMapWidget.h |
An enum about different annotations on the map.
@property (nonatomic, strong) MKMapView *mapView |
Header: | DUXMapWidget.h |
Standard iOS Map for manipulating general settings.
@property (nonatomic, assign) BOOL isMapCameraLockedOnAircraft |
Header: | DUXMapWidget.h |
Defaults to NO
. A Boolean value that determines whether the map locks the camera view on the aircraft.
- (void)changeAnnotation:(DUXMapAnnotationType)annotationType withImage:(UIImage *)image DEPRECATED_ATTRIBUTE |
Header: | DUXMapWidget.h |
Replaces current annotation type with given image. The default image for all annotation types are set.
DUXMapAnnotationType annotationType | An enum value of DUXMapAnnotationType . |
UIImage * image | Image used to represent the annotation. |
- (void)changeAnnotationOfType:(DUXMapAnnotationType)annotationType toCustomImage:(nonnull UIImage *)image withCenterOffset:(CGPoint)centerOffset |
Header: | DUXMapWidget.h |
Change the annotation type of the map widget.
DUXMapAnnotationType annotationType | An enum value of DUXMapAnnotationType . |
nonnull UIImage * image | Image used to represent the annotation. |
CGPoint centerOffset | A CGPoint struct for the center offset. |
@property (nonatomic, assign) DUXMapVisibleFlyZones visibleFlyZones |
Header: | DUXMapWidget.h |
Sets the types of fly zones to be displayed on the map. Set to DUXMapWidget_DUXMapVisibleFlyZonesNone
to hide all fly zone types.
typedef NS_OPTIONS(NSUInteger, DUXMapVisibleFlyZones) |
Header: | DUXMapWidget.h |
An enum bitmask indicating which fly zones are to be displayed by the map widget.
- (nonnull UIColor *)flyZoneOverlayColorForFlyZoneCategory:(DJIFlyZoneCategory)category |
Header: | DUXMapWidget.h |
Returns the currently used color for a given fly zone category. This does not include unlocked zones.
DJIFlyZoneCategory category | The fly zone category associated with the returned color. |
nonnull UIColor * | A UIColor object. |
- (CGFloat)flyZoneOverlayAlphaForFlyZoneCategory:(DJIFlyZoneCategory)category |
Header: | DUXMapWidget.h |
Returns the currently used alpha for a given fly zone category. This does not include unlocked zones.
DJIFlyZoneCategory category | The fly zone category associated with the returned alpha. |
CGFloat | A CGFloat value. |
@property (nonatomic, assign) BOOL showFlyZoneLegend |
Header: | DUXMapViewController.h |
Shows the fly zone legend. The fly zone legend indicates the color for all zone categories and self-unlock zones.
@property (nonatomic, assign) BOOL isMapCameraLockedOnHomePoint |
Header: | DUXMapWidget.h |
Boolean property that if enabled will lock map center onto aircraft home location.
@property (nonatomic, strong, nonnull) UIColor *flightPathStrokeColor |
Header: | DUXMapWidget.h |
Current color of the rendered flight path.
@property (nonatomic, assign) CGFloat flightPathStrokeWidth |
Header: | DUXMapWidget.h |
Current stroke width of the rendered flight path.
@property (nonatomic, assign) CGFloat flyZoneOverlayBorderWidth |
Header: | DUXMapWidget.h |
Width of the solid colored boreder of all fly zone overlays.
@property (nonatomic, assign) CGFloat maximumHeightFlyZoneOverlayAlpha |
Header: | DUXMapWidget.h |
Current alpha of a fly zone with maximum height.
@property (nonatomic, strong, nonnull) UIColor *maximumHeightFlyZoneOverlayColor |
Header: | DUXMapWidget.h |
Current color of a fly zone with maximum height.
@property (nonatomic, strong, nonnull) UIColor *directionToHomeStrokeColor |
Header: | DUXMapWidget.h |
Current color of the rendered direction to home line.
@property (nonatomic, assign) CGFloat directionToHomeStrokeWidth |
Header: | DUXMapWidget.h |
Current stroke width of the rendered direction to home line.
@property (nonatomic, strong, nonnull) UIColor *unlockedFlyZoneOverlayColor |
Header: | DUXMapWidget.h |
Current color of a self-unlock fly zone overlay.
@property (nonatomic, assign) CGFloat unlockedFlyZoneOverlayAlpha |
Header: | DUXMapWidget.h |
Current alpha of a self-unlock fly zone overlay.
@property (nonatomic, strong, nonnull) UIColor *customUnlockFlyZoneOverlayColor |
Header: | DUXMapWidget.h |
Current color of a custom unlock fly zone overlay.
@property (nonatomic, strong, nonnull) UIColor *customUnlockFlyZoneSentToAircraftOverlayColor |
Header: | DUXMapWidget.h |
Current color of a custom unlock fly zone overlay that has been sent to aircraft.
@property (nonatomic, assign) CGFloat customUnlockFlyZoneOverlayAlpha |
Header: | DUXMapWidget.h |
Current alpha of a custom unlock fly zone overlay.
@property (nonatomic, assign) CGFloat customUnlockFlyZoneSentToAircraftOverlayAlpha |
Header: | DUXMapWidget.h |
Current alpha of a custom unlock fly zone overlay that has been sent to the aircraft.
@property (nonatomic, strong, nonnull) UIColor *customUnlockFlyZoneEnabledOverlayColor |
Header: | DUXMapWidget.h |
Current color of a custom unlock fly zone overlay that has been sent to aircraft and enabled.
@property (nonatomic, assign) CGFloat customUnlockFlyZoneEnabledOverlayAlpha |
Header: | DUXMapWidget.h |
Current alpha of a custom unlock fly zone overlay that has been sent to aircraft and enabled.
@property (nonatomic, assign) BOOL showDJIAccountLoginIndicator |
Header: | DUXMapWidget.h |
Defaults to NO
. Show a small indicator displaying the latest DJI account login state. Useful if using FlySafe features.
@property (nonatomic, assign) BOOL showCustomUnlockZones |
Header: | DUXMapWidget.h |
Defaults to NO
. Shows custom unlock zones if any are available for the currently connected aircraft.
- (void)syncCustomUnlockZones |
Header: | DUXMapWidget.h |
Call this to sync currently shown custom unlock zones to aircraft. They will still need to be manually enabled.