DJIFlyZoneManager

@interface DJIFlyZoneManager : NSObject

This class manages the Geospatial Environment Online (GEO) system which provides warning, enhanced warning, authorization and restricted fly zone information. Warning zones have no flight restrictions. Enhanced warning, authorization and restricted fly zones do not allow flight by default. Enhanced warning zones can be unlocked once the user is logged into their DJI account. Authorization zones can be unlocked once the user is logged into their DJI account, and that account has been authorized to unlock authorization zones. Restricted zones cannot be unlocked using the GEO system.

Use of the geographic information provided DJIFlyZoneManager is restricted. Refer to the DJI Developer Policy.

  • The DJIFlyZoneManager singleton.

    Declaration

    Objective-C

    + (nonnull instancetype)sharedInstance;
  • Delegate to receive the updated status.

    Declaration

    Objective-C

    @property (readwrite, nonatomic) id<DJIFlyZoneDelegate> _Nullable delegate;
  • Gets all the fly zones within 20km of the aircraft. During simulation, this method is available only when the aircraft location is within 50km of (37.460484, -122.115312).

    Use of the geographic information provided by DJIFlyZoneManager is restricted. Refer to the DJI Developer Policy.

    Declaration

    Objective-C

    - (void)getFlyZonesInSurroundingAreaWithCompletion:
        (void (^_Nullable)(NSArray<DJIFlyZoneInformation *> *_Nullable,
                           NSError *_Nullable))block;

    Parameters

    block

    The execution block with the returned execution result.

  • After invoking this method, a dialog redirecting users to log into their DJI account will be shown. After the login process, if the account has not been authorized to unlock authorization zones, the dialog will then redirect users to authorize their account.

    Declaration

    Objective-C

    - (void)logIntoDJIUserAccountWithCompletion:(DJICompletionBlock)block;

    Parameters

    block

    The execution block with the returned execution result.

  • Logs out the logged in DJI user.

    Declaration

    Objective-C

    - (void)logOutOfDJIUserAccountWithCompletion:(DJICompletionBlock)block;

    Parameters

    block

    The execution block with the returned execution result.

  • YES to enable GEO system. By default, if the GEO system is available at the aircraft location, GEO system will be enabled. The setting is NOT settable when the aircraft is in the air. The setting will take effect only when the aircraft lands. When GEO system is disabled, the aircraft reverts back to the previous NFZ (No Fly Zone) system. This interface may be deprecated in the future.

    Declaration

    Objective-C

    - (void)setGEOSystemEnabled:(BOOL)enabled
                 withCompletion:(DJICompletionBlock)block;

    Parameters

    enabled

    YES to enable GEO system.

    block

    The execution block with the returned execution result.

  • Gets if the GEO system is enabled or not.

    Declaration

    Objective-C

    - (void)getGEOSystemEnabled:(void (^_Nonnull)(BOOL, NSError *_Nullable))block;

    Parameters

    block

    Completion block that receives the getter execution result.

  • Gets the account status.

    Declaration

    Objective-C

    - (DJIUserAccountStatus)getUserAccountStatus;

    Return Value

    current account status.

  • Gets a list of unlocked fly zones of the authorized account. The list contains the fly zones unlocked by the Flight Planner http://www.dji.com/flysafe/geo-system#planner and fly zones unlocked during flight using DJI GO or any DJI Mobile SDK based application.

    Declaration

    Objective-C

    - (void)getUnlockedFlyZonesWithCompletion:
        (void (^_Nullable)(NSArray<DJIFlyZoneInformation *> *_Nullable,
                           NSError *_Nullable))block;

    Parameters

    block

    The execution block with the returned execution result.

  • Unlocks the selected fly zones. This method can be used to unlock enhanced warning and authorization zones. After unlocking the zones flight will be unrestricted in those zones until the unlock expires. The unlocking record will be linked to the user’s account and will be accessible to DJI GO and other DJI Mobile SDK based applications.

    Declaration

    Objective-C

    - (void)unlockFlyZones:(NSArray<NSNumber *> *_Nullable)flyZoneIDs
            withCompletion:(DJICompletionBlock)block;

    Parameters

    flyZoneIDs

    The IDs of EnhancedWarningZones or AuthorizedWarningZones.

    block

    The execution block with the returned execution result.