Show / Hide Table of Contents

Class Tile

A Map tile, a square with vector or raster data representing a geographic bounding box. More info here .

Inheritance
System.Object
Tile
RasterTile
VectorTile
Namespace:Mapbox.Map
Assembly:Mapbox.Map.dll
Syntax
public abstract class Tile : object

Properties

CurrentState

Gets the current state. When fully loaded, you must check if the data actually arrived and if the tile is accusing any error.

Declaration
public Tile.State CurrentState { get; }
Property Value
Type Description
Tile.State

The tile state.

Error

Gets the error message if any.

Declaration
public string Error { get; }
Property Value
Type Description
System.String

The error string.

Id

Gets the CanonicalTileId identifier.

Declaration
public CanonicalTileId Id { get; set; }
Property Value
Type Description
CanonicalTileId

The canonical tile identifier.

Methods

Cancel()

Cancels the request for the Tile object. It will stop a network request and set the tile's state to Canceled.

Declaration
public void Cancel()
Examples
// Do not request tiles that we are already requesting
// but at the same time exclude the ones we don't need
// anymore, cancelling the network request.
this.tiles.RemoveWhere((T tile) =>
{
    if (cover.Remove(tile.Id))
    {
        return false;
    }
    else
    {
        tile.Cancel();
        this.NotifyNext(tile);
        return true;            
    }
});

Initialize(Tile.Parameters, Action)

Initializes the Tile object. It will start a network request and fire the callback when completed.

Declaration
public void Initialize(Tile.Parameters param, Action callback)
Parameters
Type Name Description
Tile.Parameters param

Initialization parameters.

Action callback

The completion callback.

SetError(String)

Sets the error message.

Declaration
public void SetError(string errorMessage)
Parameters
Type Name Description
System.String errorMessage

SetState(Tile.State)

Declaration
public void SetState(Tile.State state)
Parameters
Type Name Description
Tile.State state

ToString()

Returns a System.String that represents the current Tile.

Declaration
public override string ToString()
Returns
Type Description
System.String

A System.String that represents the current Tile.

Back to top Copyright © 2015-2016 Microsoft
Generated by DocFX