MaplyQuadLoaderBase
Objective-C
@interface MaplyQuadLoaderBase : NSObject
Swift
class MaplyQuadLoaderBase : NSObject
Base class for the quad loaders.
The image, frame, and data paging loaders all share much of the same functionality.
-
Control how tiles are indexed, either from the lower left or the upper left.
If set, we’ll use the OSM approach (also Google Maps) to y indexing. That’s that default and it’s normally what you’re run into.
Strictly speaking, TMS addressing (the standard) is flipped the other way. So if your tile source looks odd, try setting this to false.
Default value is true.
Declaration
Objective-C
@property (nonatomic) _Bool flipY;
Swift
var flipY: Bool { get set }
-
Set for a lot of debugging output
Declaration
Objective-C
@property (nonatomic) _Bool debugMode;
Swift
var debugMode: Bool { get set }
-
View controller this is attached to. Useful for delegate calls that might not be tracking that.
Declaration
Objective-C
@property (nonatomic, weak, readonly, nullable) NSObject<MaplyRenderControllerProtocol> *viewC;
Swift
weak var viewC: (NSObjectProtocol & MaplyRenderControllerProtocol)? { get }
-
If set, we’ll call the interpreter on this queue
Declaration
Objective-C
@property (nonatomic, strong, nullable) dispatch_queue_t queue;
Swift
var queue: DispatchQueue? { get set }
-
Number of simulataneous tiles we’ll parse This is really just a limit on the number of tiles we'lll parse concurrently to keep memory use under control
Declaration
Objective-C
@property (nonatomic) unsigned int numSimultaneousTiles;
Swift
var numSimultaneousTiles: UInt32 { get set }
-
Undocumented
Declaration
Objective-C
- (bool)isLoading;
Swift
func isLoading() -> Bool
-
Calculate the bounding box for a single tile in geographic.
This is a utility method for calculating the extents of a given tile in geographic (e.g. lon/lat).
Declaration
Objective-C
- (MaplyBoundingBox)geoBoundsForTile:(MaplyTileID)tileID;
Swift
func geoBounds(forTile tileID: MaplyTileID) -> MaplyBoundingBox
Parameters
tileID
The ID for the tile we’re interested in.
Return Value
The lower left and upper right corner of the tile in geographic coordinates. Returns kMaplyNullBoundingBox in case of error
-
Calculate the bounding box for a single tile in geographic using doubles.
This is a utility method for calculating the extents of a given tile in geographic (e.g. lon/lat).
Declaration
Objective-C
- (MaplyBoundingBoxD)geoBoundsForTileD:(MaplyTileID)tileID;
Swift
func geoBounds(for tileID: MaplyTileID) -> MaplyBoundingBoxD
Parameters
tileID
The ID for the tile we’re interested in.
Return Value
The lower left and upper right corner of the tile in geographic coordinates. Returns kMaplyNullBoundingBoxD in case of error
-
Calculate the bounding box for a single tile in the local coordinate system.
This utility method calculates the bounding box for a tile in the coordinate system used for the layer.
Declaration
Objective-C
- (MaplyBoundingBox)boundsForTile:(MaplyTileID)tileID;
Swift
func bounds(forTile tileID: MaplyTileID) -> MaplyBoundingBox
Parameters
tileID
The ID for the tile we’re interested in.
Return Value
The lower left and upper right corner of the tile in local coordinates.
-
Calculate the bounding box for a single tile in the local coordinate system using doubles.
This utility method calculates the bounding box for a tile in the coordinate system used for the layer.
Declaration
Objective-C
- (MaplyBoundingBoxD)boundsForTileD:(MaplyTileID)tileID;
Swift
func bounds(for tileID: MaplyTileID) -> MaplyBoundingBoxD
Parameters
tileID
The ID for the tile we’re interested in.
Return Value
The lower left and upper right corner of the tile in geographic coordinates.
-
Return the center of the tile in display coordinates.
Declaration
Objective-C
- (MaplyCoordinate3d)displayCenterForTile:(MaplyTileID)tileID;
Swift
func displayCenter(forTile tileID: MaplyTileID) -> MaplyCoordinate3d
Parameters
tileID
The ID for the tile we’re interested in.
Return Value
Return the center in display space for the given tile.
-
Each sampling layer allocates a slot to keep track of continuous zoom levels. Those are passed all the way through to the individual shaders.
Declaration
Objective-C
- (int)getZoomSlot;
Swift
func getZoomSlot() -> Int32
-
Use a specific tile fetcher rather than the one shared by everyone else
Declaration
Objective-C
- (void)setTileFetcher:(NSObject<MaplyTileFetcher> *_Nonnull)tileFetcher;
Swift
func setTileFetcher(_ tileFetcher: MaplyTileFetcher)
-
Set the interpreter for the data coming back. If you’re just getting images, don’t set this.
Declaration
Objective-C
- (void)setInterpreter:(NSObject<MaplyLoaderInterpreter> *_Nonnull)interp;
Swift
func setInterpreter(_ interp: MaplyLoaderInterpreter)
-
Change the interpreter and reload all the data.
You can change the tile interpreter being used to build objects and images. This will then force a reload of the tiles (hopefully from cache) and the visuals will change as everything comes in.Declaration
Objective-C
- (void)changeInterpreter:(NSObject<MaplyLoaderInterpreter> *_Nonnull)interp;
Swift
func change(_ interp: MaplyLoaderInterpreter)
-
Force a reload of the data.
All the current loads will be cancelled, any in flight will be ignored and the loader will ask for a whole new set of data.Declaration
Objective-C
- (void)reload;
Swift
func reload()
-
Force a reload of the tiles overlapping a bounding box.
All the current loads will be cancelled, any in flight will be ignored and the loader will ask for a whole new set of data.Declaration
Objective-C
- (void)reloadArea:(MaplyBoundingBox)bounds;
Swift
func reloadArea(_ bounds: MaplyBoundingBox)
-
Force a reload of the tiles overlapping a set of bounding boxes
All the current loads will be cancelled, any in flight will be ignored and the loader will ask for a whole new set of data.Declaration
Objective-C
- (void)reloadAreas:(NSArray<NSValue *> *_Nullable)bounds;
Swift
func reloadAreas(_ bounds: [NSValue]?)
-
Turn off the loader and shut things down. This unregisters us with the sampling layer and shuts down the various objects we created.
Declaration
Objective-C
- (void)shutdown;
Swift
func shutdown()