MaplyLoaderInterpreter

Objective-C

@protocol MaplyLoaderInterpreter <NSObject>

Swift

protocol MaplyLoaderInterpreter : NSObjectProtocol

Loader Interpreter converts raw data into images and objects.

Converts data returned from a remote source (or cache) into images and/or MaplyComponentObjects that have already been added to the view (disabled).

  • Set when the loader first starts up.

    If you need to tweak loader settings, do it here.
    

    Declaration

    Objective-C

    - (void)setLoader:(MaplyQuadLoaderBase *_Nonnull)loader;

    Swift

    func setLoader(_ loader: MaplyQuadLoaderBase)
  • Parse the data coming back from a remote request and turn it into something we can use.

    Convert the NSData passed in to image and component objects (e.g. add stuff to the view controller). Everything added should be disabled to start.

    Declaration

    Objective-C

    - (void)dataForTile:(MaplyLoaderReturn *_Nonnull)loadReturn
                 loader:(MaplyQuadLoaderBase *_Nonnull)loader;

    Swift

    func data(forTile loadReturn: MaplyLoaderReturn, loader: MaplyQuadLoaderBase)
  • Notification that the tile was unloaded by the system. If you’re tracking your own resources, you may need this.

    Declaration

    Objective-C

    - (void)tileUnloaded:(MaplyTileID)tileID;

    Swift

    func tileUnloaded(_ tileID: MaplyTileID)