MSFTileLayer

Objective-C


@interface MSFTileLayer : MSFLayer

Swift

class MSFTileLayer : MSFLayer

An abstract base class for all tile layers.

  • Returns the data source assigned to this layer.

    Declaration

    Objective-C

    - (MSFTileDataSource *)getDataSource;

    Swift

    func getDataSource() -> MSFTileDataSource!

    Return Value

    The tile data source assigned to this layer.

  • Returns the projection this layer’s data is in, which is its data source’s.

    Declaration

    Objective-C

    - (MSFProjection *)getProjection;

    Swift

    func getProjection() -> MSFProjection!

    Return Value

    The projection, or null when the layer has no data source.

  • Returns the tile data source of the associated UTF grid. By default this is null.

    Declaration

    Objective-C

    - (MSFTileDataSource *)getUTFGridDataSource;

    Swift

    func getUTFGridDataSource() -> MSFTileDataSource!

    Return Value

    The tile data source of the associated UTF grid.

  • Sets the tile data source of the associated UTF grid.

    Declaration

    Objective-C

    - (void)setUTFGridDataSource:(MSFTileDataSource *)dataSource;

    Swift

    func setUTFGridDataSource(_ dataSource: MSFTileDataSource!)

    Parameters

    dataSource

    The data source to use. Can be null if UTF grid is not used.

  • Returns the current frame number.

    How many tiles the last cull put on screen, and how many are preloaded around them. A diagnostic: it is what the tile LOD numbers actually cost.

    Declaration

    Objective-C

    - (int)getVisibleTileCount;

    Swift

    func getVisibleTileCount() -> Int32

    Return Value

    The tile count after the last cull pass.

  • Declaration

    Objective-C

    - (int)getPreloadingTileCount;

    Swift

    func getPreloadingTileCount() -> Int32

    Return Value

    The count of tiles fetched around the visible ones, but not drawn.

  • Undocumented

    Declaration

    Objective-C

    -(int)getFrameNr;

    Swift

    func getFrameNr() -> Int32
  • Sets the frame number, only used for animated tiles. Loading a new frame may take some time, previous frame is shown during loading.

    Declaration

    Objective-C

    - (void)setFrameNr:(int)frameNr;

    Swift

    func setFrameNr(_ frameNr: Int32)

    Parameters

    frameNr

    The frame number to display.

  • Returns the state of the preloading flag of this layer.

    Declaration

    Objective-C

    - (BOOL)isPreloading;

    Swift

    func isPreloading() -> Bool

    Return Value

    True if preloading is enabled.

  • Sets the state of preloading for this layer. Preloading allows the downloading of tiles that are not currently visible on screen, but are adjacent to ones that are. This means that the user can pan the map without immediately noticing any missing tiles.

    Enabling this option might introduce a small performance hit on slower devices. It should also be noted that this will considerably increase network traffic if used with online maps. The default is false.

    Declaration

    Objective-C

    - (void)setPreloading:(BOOL)preloading;

    Swift

    func setPreloading(_ preloading: Bool)

    Parameters

    preloading

    The new preloading state of the layer.

  • Returns the state of the synchronized refresh flag.

    Declaration

    Objective-C

    - (BOOL)isSynchronizedRefresh;

    Swift

    func isSynchronizedRefresh() -> Bool

    Return Value

    The state of the synchronized refresh flag.

  • Sets the state of the synchronized refresh flag. If disabled all tiles will appear on screen one by one as they finish loading. If enabled the map will wait for all the visible tiles to finish loading and then show them all on screen together. This is useful for animated tiles.

    Declaration

    Objective-C

    - (void)setSynchronizedRefresh:(BOOL)synchronizedRefresh;

    Swift

    func setSynchronizedRefresh(_ synchronizedRefresh: Bool)

    Parameters

    synchronizedRefresh

    The new state of the synchronized refresh flag.

  • Returns the current tile substitution policy.

    Declaration

    Objective-C

    - (enum MSFTileSubstitutionPolicy)getTileSubstitutionPolicy;

    Swift

    func getTileSubstitutionPolicy() -> MSFTileSubstitutionPolicy

    Return Value

    The current substitution policy. Default is TILE_SUBSTITUTION_POLICY_ALL.

  • Sets the current tile substitution policy.

    Declaration

    Objective-C

    - (void)setTileSubstitutionPolicy:(enum MSFTileSubstitutionPolicy)policy;

    Swift

    func setTileSubstitutionPolicy(_ policy: MSFTileSubstitutionPolicy)

    Parameters

    policy

    The new substitution policy. Default is TILE_SUBSTITUTION_POLICY_ALL.

  • Gets the current zoom level bias for this layer.

    Declaration

    Objective-C

    - (float)getZoomLevelBias;

    Swift

    func getZoomLevelBias() -> Float

    Return Value

    The current zoom level bias for this layer.

  • Sets the zoom level bias for this layer. Higher zoom level bias forces SDK to use more detailed tiles for given view compared to lower zoom bias. The default bias is 0.

    Declaration

    Objective-C

    - (void)setZoomLevelBias:(float)bias;

    Swift

    func setZoomLevelBias(_ bias: Float)

    Parameters

    bias

    The new bias value, both positive and negative fractional values are supported.

  • Gets the current maximum overzoom level for this layer.

    Declaration

    Objective-C

    - (int)getMaxOverzoomLevel;

    Swift

    func getMaxOverzoomLevel() -> Int32

    Return Value

    The current maximum overzoom level for this layer.

  • Sets the maximum overzoom level for this layer. If a tile for the given zoom level Z is not available, SDK will try to use tiles with zoom levels Z-1, …, Z-MaxOverzoomLevel. The default is 6.

    Declaration

    Objective-C

    - (void)setMaxOverzoomLevel:(int)overzoomLevel;

    Swift

    func setMaxOverzoomLevel(_ overzoomLevel: Int32)

    Parameters

    overzoomLevel

    The new maximum overzoom value.

  • Gets how many zoom levels up a cached tile may stand in for a missing one.

    Declaration

    Objective-C

    - (int)getMaxStandInLevel;

    Swift

    func getMaxStandInLevel() -> Int32

    Return Value

    The current maximum stand-in level for this layer.

  • Sets how many zoom levels up a cached tile may stand in for a missing one while it loads.

    This used to be MaxOverzoomLevel, which is a different thing: that one says how far the SDK may go for the DATA of a tile the source does not have, and it has to stay deep. The stand-in is only what is shown meanwhile, and a deep one is visible as a ladder - the same area redrawn from a z7 tile, then z8, then z9, each magnified 2^N and so 2^N coarser than it was meant to look. That is glaring for a source whose detail changes with zoom, like generated contours, and merely wasteful for a raster.

    The default is 6, the same as MaxOverzoomLevel: a zoom-in of several levels must still find something to show, or the map goes empty exactly when the user asked for more detail. Lower it (1 = immediate parent only) for a source whose look changes so much with zoom that a coarse stand-in is worse than nothing.

    Declaration

    Objective-C

    - (void)setMaxStandInLevel:(int)standInLevel;

    Swift

    func setMaxStandInLevel(_ standInLevel: Int32)

    Parameters

    standInLevel

    The new maximum stand-in level.

  • Gets the current maximum underzoom level for this layer.

    Declaration

    Objective-C

    - (int)getMaxUnderzoomLevel;

    Swift

    func getMaxUnderzoomLevel() -> Int32

    Return Value

    The current maximum underzoom level for this layer.

  • Sets the maximum underzoom level for this layer. If a tile for the given zoom level Z is not available, SDK will try to use tiles with zoom levels Z-1, …, Z-MaxOverzoomLevel and then Z+1, …, Z+MaxUnderzoomLevel. The default is 3.

    Declaration

    Objective-C

    - (void)setMaxUnderzoomLevel:(int)underzoomLevel;

    Swift

    func setMaxUnderzoomLevel(_ underzoomLevel: Int32)

    Parameters

    underzoomLevel

    The new maximum underzoom value.

  • Calculates the tile corresponding to given geographical coordinates and zoom level. Note: zoom level bias is NOT applied, only discrete zoom level is used.

    Declaration

    Objective-C

    - (MSFMapTile *)calculateMapTile:(MSFMapPos *)mapPos zoom:(int)zoom;

    Swift

    func calculateMapTile(_ mapPos: MSFMapPos!, zoom: Int32) -> MSFMapTile!

    Parameters

    mapPos

    Coordinates of the point in data source projection coordinate system.

    zoom

    Zoom level to use for the tile.

    Return Value

    The corresponding map tile.

  • Calculates the origin of given map tile.

    Declaration

    Objective-C

    - (MSFMapPos *)calculateMapTileOrigin:(MSFMapTile *)mapTile;

    Swift

    func calculateMapTileOrigin(_ mapTile: MSFMapTile!) -> MSFMapPos!

    Parameters

    mapTile

    The map tile to use.

    Return Value

    The corresponding coordinates of the tile origin in data source projection coordinate system.

  • Calculates the bounds of given map tile.

    Declaration

    Objective-C

    - (MSFMapBounds *)calculateMapTileBounds:(MSFMapTile *)mapTile;

    Swift

    func calculateMapTileBounds(_ mapTile: MSFMapTile!) -> MSFMapBounds!

    Parameters

    mapTile

    The map tile to use.

    Return Value

    The corresponding bounds of the tile origin in data source projection coordinate system.

  • Clears layer tile caches. This will release memory allocated to tiles.

    Declaration

    Objective-C

    - (void)clearTileCaches:(BOOL)all;

    Swift

    func clearTileCaches(_ all: Bool)

    Parameters

    all

    True if all tiles should be released, otherwise only preloading (invisible) tiles are released.

  • Returns the tile load listener.

    Declaration

    Objective-C

    - (MSFTileLoadListener *)getTileLoadListener;

    Swift

    func getTileLoadListener() -> MSFTileLoadListener!

    Return Value

    The tile load listener.

  • Sets the tile load listener.

    Declaration

    Objective-C

    - (void)setTileLoadListener:(MSFTileLoadListener *)tileLoadListener;

    Swift

    func setTileLoadListener(_ tileLoadListener: MSFTileLoadListener!)

    Parameters

    tileLoadListener

    The tile load listener.

  • Returns the UTF grid event listener.

    Declaration

    Objective-C

    - (MSFUTFGridEventListener *)getUTFGridEventListener;

    Swift

    func getUTFGridEventListener() -> MSFUTFGridEventListener!

    Return Value

    The UTF grid event listener.

  • Sets the UTF grid event listener.

    Declaration

    Objective-C

    - (void)setUTFGridEventListener:(MSFUTFGridEventListener *)utfGridEventListener;

    Swift

    func setUTFGridEventListener(_ utfGridEventListener: MSFUTFGridEventListener!)

    Parameters

    utfGridEventListener

    The UTF grid event listener.

  • Undocumented

    Declaration

    Objective-C

    - (BOOL)isUpdateInProgress;

    Swift

    func isUpdateInProgress() -> Bool
  • Whether the visible tiles are all decoded for the terrain state the layer is now in. False from the moment a 2D/3D switch invalidates them until their replacements have arrived; the switch waits on it before it lets the terrain rise. Internal method.

    Declaration

    Objective-C

    - (BOOL)isTerrainDecodeSettled;

    Swift

    func isTerrainDecodeSettled() -> Bool

    Return Value

    True if no tile is still waiting for the current terrain decode state.

  • Undocumented

    Declaration

    Objective-C

    -(void)collectSpanDrapeTiles: (SWIGTYPE_p_std__mapT_massif__vt__TileId_std__size_t_t*)spanTiles;

    Swift

    func collectSpanDrapeTiles(_ spanTiles: SWIGTYPE_p_std__mapT_massif__vt__TileId_std__size_t_t!)
  • Undocumented

    Declaration

    Objective-C

    -(int)bakeSpanDrapeTile: (SWIGTYPE_p_massif__vt__TileId*)tileId;

    Swift

    func bakeSpanDrapeTile(_ tileId: SWIGTYPE_p_massif__vt__TileId!) -> Int32
  • Undocumented

    Declaration

    Objective-C

    -(void)setSpanDrapeTextures: (SWIGTYPE_p_std__mapT_massif__vt__TileId_unsigned_int_t*)textures;

    Swift

    func setSpanDrapeTextures(_ textures: SWIGTYPE_p_std__mapT_massif__vt__TileId_unsigned_int_t!)
  • Undocumented

    Declaration

    Objective-C

    -(void)setGroundDrapeTextures: (SWIGTYPE_p_std__mapT_massif__vt__TileId_massif__TileLayer__GroundDrapeRef_t*)drapes;
  • Undocumented

    Declaration

    Objective-C

    -(void)collectDrapeStackOrder: (SWIGTYPE_p_std__vectorT_std__pairT_int_bool_t_t*)units;

    Swift

    func collectDrapeStackOrder(_ units: SWIGTYPE_p_std__vectorT_std__pairT_int_bool_t_t!)
  • Undocumented

    Declaration

    Objective-C

    -(int)bakeDrapeCoverage: (SWIGTYPE_p_massif__vt__TileId*)tileId fromStyleLayerIdx: (int)fromStyleLayerIdx;

    Swift

    func bakeDrapeCoverage(_ tileId: SWIGTYPE_p_massif__vt__TileId!, fromStyleLayerIdx: Int32) -> Int32
  • Undocumented

    Declaration

    Objective-C

    -(void)setDrapeCoverageMasks: (SWIGTYPE_p_std__vectorT_std__mapT_massif__vt__TileId_unsigned_int_t_t*)maskTextures styleLayerMasks: (SWIGTYPE_p_std__mapT_int_int_t*)styleLayerMasks;

    Swift

    func setDrapeCoverageMasks(_ maskTextures: SWIGTYPE_p_std__vectorT_std__mapT_massif__vt__TileId_unsigned_int_t_t!, styleLayerMasks: SWIGTYPE_p_std__mapT_int_int_t!)
  • Undocumented

    Declaration

    Objective-C

    -(int)consumeShadowCastersMissingElevation;

    Swift

    func consumeShadowCastersMissingElevation() -> Int32
  • Undocumented

    Declaration

    Objective-C

    -(void)setTerrainShadowMask: (unsigned int)texture invScreenWidth: (float)invScreenWidth invScreenHeight: (float)invScreenHeight;

    Swift

    func setTerrainShadowMask(_ texture: UInt32, invScreenWidth: Float, invScreenHeight: Float)
  • Undocumented

    Declaration

    Objective-C

    -(int)renderTerrainShadowMask: (SWIGTYPE_p_std__vectorT_massif__vt__TileId_t*)tileIds;

    Swift

    func renderTerrainShadowMask(_ tileIds: SWIGTYPE_p_std__vectorT_massif__vt__TileId_t!) -> Int32
  • Undocumented

    Declaration

    Objective-C

    -(BOOL)isGroundAOActive;

    Swift

    func isGroundAOActive() -> Bool
  • Undocumented

    Declaration

    Objective-C

    -(BOOL)isGroundAOBakeable;

    Swift

    func isGroundAOBakeable() -> Bool
  • Undocumented

    Declaration

    Objective-C

    -(void)setLabelOcclusionDepth: (unsigned int)depthTexture occluderSize: (float)occluderSize;

    Swift

    func setLabelOcclusionDepth(_ depthTexture: UInt32, occluderSize: Float)
  • Undocumented

    Declaration

    Objective-C

    -(BOOL)isLabelOcclusionWanted;

    Swift

    func isLabelOcclusionWanted() -> Bool
  • Undocumented

    Declaration

    Objective-C

    -(int)renderLabelOcclusionDepth;

    Swift

    func renderLabelOcclusionDepth() -> Int32
  • Undocumented

    Declaration

    Objective-C

    -(int)renderGroundAOMask;

    Swift

    func renderGroundAOMask() -> Int32
  • Undocumented

    Declaration

    Objective-C

    -(int)bakeGroundAOMask: (SWIGTYPE_p_massif__vt__TileId*)tileId;

    Swift

    func bakeGroundAOMask(_ tileId: SWIGTYPE_p_massif__vt__TileId!) -> Int32
  • Undocumented

    Declaration

    Objective-C

    -(void)dealloc;

    Swift

    func dealloc()