MaplyLoaderReturn

Objective-C

@interface MaplyLoaderReturn : NSObject

Swift

class MaplyLoaderReturn : NSObject

Passed in to and returned by the Loader Interpreter.

We pass this into the interpreter with the unparsed data. It parses it and passes that data back, possibly with an error.

  • Initialize with the loader this will be attached to

    Declaration

    Objective-C

    - (id _Nonnull)initWithLoader:(MaplyQuadLoaderBase *_Nonnull)loader;

    Swift

    init(loader: MaplyQuadLoaderBase)
  • Tile this is the data for

    Declaration

    Objective-C

    @property (nonatomic) MaplyTileID tileID;

    Swift

    var tileID: MaplyTileID { get set }
  • If set, the frame. -1 by default

    Declaration

    Objective-C

    @property (nonatomic, readonly) int frame;

    Swift

    var frame: Int32 { get }
  • Data returned from a tile request. Unparsed. You can add multiple of these, but the interpreter should be expecting that

    Declaration

    Objective-C

    - (void)addTileData:(id _Nonnull)tileData;

    Swift

    func addTileData(_ tileData: Any)
  • Return the tile NSData objects as an array

    Declaration

    Objective-C

    - (NSArray<id> *_Nonnull)getTileData;

    Swift

    func getTileData() -> [Any]
  • Return the first data object. You’re probably only expecting the one.

    Declaration

    Objective-C

    - (id _Nullable)getFirstData;

    Swift

    func getFirstData() -> Any?
  • If this is set, the tile failed to parse You can set it and the system will deal with the results

    Declaration

    Objective-C

    @property (nonatomic, strong) NSError *_Nullable error;

    Swift

    var error: Error? { get set }