NTTileLayer


@interface NTTileLayer : NTLayer

An abstract base class for all tile layers.

  • Returns the data source assigned to this layer.

    Declaration

    Objective-C

    - (NTTileDataSource *)getDataSource;

    Return Value

    The tile data source assigned to this layer.

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

    Declaration

    Objective-C

    - (NTTileDataSource *)getUTFGridDataSource;

    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:(NTTileDataSource *)dataSource;

    Parameters

    dataSource

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

  • Returns the current frame number.

    Declaration

    Objective-C

    - (int)getFrameNr;

    Return Value

    The current frame number.

  • 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;

    Parameters

    frameNr

    The frame number to display.

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

    Declaration

    Objective-C

    - (BOOL)isPreloading;

    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;

    Parameters

    preloading

    The new preloading state of the layer.

  • Returns the state of the synchronized refresh flag.

    Declaration

    Objective-C

    - (BOOL)isSynchronizedRefresh;

    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;

    Parameters

    synchronizedRefresh

    The new state of the synchronized refresh flag.

  • Returns the current tile substitution policy.

    Declaration

    Objective-C

    - (enum NTTileSubstitutionPolicy)getTileSubstitutionPolicy;

    Return Value

    The current substitution policy. Default is TILE_SUBSTITUTION_POLICY_ALL.

  • Sets the current tile substitution policy.

    Declaration

    Objective-C

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

    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;

    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;

    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;

    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;

    Parameters

    overzoomLevel

    The new maximum overzoom value.

  • Gets the current maximum underzoom level for this layer.

    Declaration

    Objective-C

    - (int)getMaxUnderzoomLevel;

    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;

    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

    - (NTMapTile *)calculateMapTile:(NTMapPos *)mapPos zoom:(int)zoom;

    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

    - (NTMapPos *)calculateMapTileOrigin:(NTMapTile *)mapTile;

    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

    - (NTMapBounds *)calculateMapTileBounds:(NTMapTile *)mapTile;

    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;

    Parameters

    all

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

  • Returns the tile load listener.

    Declaration

    Objective-C

    - (NTTileLoadListener *)getTileLoadListener;

    Return Value

    The tile load listener.

  • Sets the tile load listener.

    Declaration

    Objective-C

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

    Parameters

    tileLoadListener

    The tile load listener.

  • Returns the UTF grid event listener.

    Declaration

    Objective-C

    - (NTUTFGridEventListener *)getUTFGridEventListener;

    Return Value

    The UTF grid event listener.

  • Sets the UTF grid event listener.

    Declaration

    Objective-C

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

    Parameters

    utfGridEventListener

    The UTF grid event listener.

  • Undocumented

    Declaration

    Objective-C

    - (BOOL)isUpdateInProgress;
  • Undocumented

    Declaration

    Objective-C

    -(void)dealloc;