Skip to main content

interface IMapTile

(Niantic.Lightship.Maps.Core.IMapTile)

Overview

MapTile contains the features requested to render a single map tile.

interface IMapTile {
// properties

ulong Id;
Vector3D Origin;
double Size;
int ZoomLevel;
string TileCoordinateString;

// methods

IEnumerable<T> GetTileDataOfType< T >(LayerKind layer);
IEnumerable<T> GetTileDataOfType< T >(LayerKind layer, FeatureKind featureKind);
IReadOnlyList<IMapTileFeature> GetTileData(LayerKind layer);

IReadOnlyList<IMapTileFeature> GetTileData(
LayerKind layer,
FeatureKind featureKind
);
};

Detailed Documentation

MapTile contains the features requested to render a single map tile.

The coordinates of the map features are normalized to 1 within the tile.

The geometry is clipped on tile boundaries.

Properties

Id

ulong Id

A unique ID representing the tile.

Origin

Vector3D Origin

The origin of the tile in map units.

Size

double Size

The size of the map tile in map units.

ZoomLevel

int ZoomLevel

The map zoom level that the tile is coming from.

TileCoordinateString

string TileCoordinateString

A string containing the maptile's zoom level and coordinates, for display and debugging purposes.

Methods

GetTileDataOfType< T >

IEnumerable<T> GetTileDataOfType< T >(LayerKind layer)

Returns all of this tile's IMapTileFeatures of a given type in the specified layer. NOTE: This method does a small amount of memory allocation when it's called. Please consider using GetTileData(LayerKind) instead.

    Parameters:

    layer - The layer containing features to return

    T - The concrete feature type to return

    Returns:

    An IEnumerable of features of the specified type

GetTileDataOfType< T >

IEnumerable<T> GetTileDataOfType< T >(LayerKind layer, FeatureKind featureKind)

Returns all of this tile's IMapTileFeatures of a given type and FeatureKind in the specified layer. NOTE: This method does a small amount of memory allocation when it's called. Please consider using GetTileData(LayerKind,FeatureKind) instead.

    Parameters:

    layer - The later containing features to return

    featureKind - The feature kind to return

    T - The concrete feature type to return

    Returns:

    An IEnumerable of features of the specified type

GetTileData

IReadOnlyList<IMapTileFeature> GetTileData(LayerKind layer)

Returns all of this tile's IMapTileFeatures in the specified layer.

    Parameters:

    layer - The later containing features to return

    Returns:

    A List of features in the specified layer

GetTileData

IReadOnlyList<IMapTileFeature> GetTileData(
LayerKind layer,
FeatureKind featureKind
)

Returns all of this tile's IMapTileFeatures of a given FeatureKind in the specified layer.

    Parameters:

    layer - The later containing features to return

    featureKind - The feature kind to return

    Returns:

    A List of features of a given kind in the specified layer