Skip to content

VectorTile

Namespace: ThinkGeo.Core

Represents the VectorTile class.

public class VectorTile : Tile

Inheritance objectTileVectorTile

Properties

IsFromCache

Gets or sets the IsFromCache.

public bool IsFromCache { get; set; }

Property Value

bool

Content

Gets or sets the Content.

public Byte[] Content { get; set; }

Property Value

Byte[]

ZoomIndex

Gets or sets the ZoomIndex.

public int ZoomIndex { get; set; }

Property Value

int

X

Gets or sets the X.

public long X { get; set; }

Property Value

long

Column

Gets or sets the Column.

public long Column { get; set; }

Property Value

long

Y

Gets or sets the Y.

public long Y { get; set; }

Property Value

long

Row

Gets or sets the Row.

public long Row { get; set; }

Property Value

long

CacheId

The CacheId of the Tile. This is for avoiding the issue that Tile A is saved to Tile B's Cache in a multi-threading environment.

public string CacheId { get; set; }

Property Value

string

Constructors

VectorTile()

Initializes a new instance of the VectorTile class.

public VectorTile()

VectorTile(Byte[], int, long, long)

Initializes a new instance of the VectorTile class.

public VectorTile(Byte[] content, int zoom, long x, long y)

Parameters

content Byte[]

zoom int

x long

y long

Methods

GetFeatures(IEnumerable<string>)

internal Collection<Feature> GetFeatures(IEnumerable<string> pbfLayerNames)

Parameters

pbfLayerNames IEnumerable<string>

Returns

Collection<Feature>

GetFeatures(IEnumerable<PbfLayer>)

Returns features from the underlying data source.

public Collection<Feature> GetFeatures(IEnumerable<PbfLayer> layers)

Parameters

layers IEnumerable<PbfLayer>
The layers.

Returns

Collection<Feature>
The result of the operation.

GetPbfLayers()

Read all pbf layers from vector tileView.

public Collection<PbfLayer> GetPbfLayers()

Returns

Collection<PbfLayer>
All pbf layers of vector tileView.

BuildContentFromPbfLayers(IEnumerable<PbfLayer>)

Serializes a set of PbfLayer back into a gzipped Mapbox‐vector‐tile byte array.

public static Byte[] BuildContentFromPbfLayers(IEnumerable<PbfLayer> layers)

Parameters

layers IEnumerable<PbfLayer>
The layers you want to embed, in the desired Z/X/Y order (any order really).

Returns

Byte[]
A gzipped PBF blob ready to be stored in your tile_data field.