Show / Hide Table of Contents

Class RawPngRasterTile

A raster tile containing an encoded RGBA PNG. Read about global elevation data.

Inheritance
System.Object
Tile
RasterTile
RawPngRasterTile
Inherited Members
RasterTile.Data
Tile.Id
Tile.Error
Tile.SetError(String)
Tile.CurrentState
Tile.Initialize(Tile.Parameters, Action)
Tile.ToString()
Tile.Cancel()
Tile.SetState(Tile.State)
Namespace:Mapbox.Map
Assembly:Mapbox.Map.dll
Syntax
public sealed class RawPngRasterTile : RasterTile
Examples

Print the real world height, in meters, for each pixel:

var texture = new Texture2D(0, 0);
texture.LoadImage(tile.Data);
for (int i = 0; i < texture.width; i++)
{
    for (int j = 0; j < texture.height; j++)
    {
        var color = texture.GetPixel(i, j);
        var height = Conversions.GetAbsoluteHeightFromColor(color);
        Console.Write("Height: " + height);
    }
}
Back to top Copyright © 2015-2016 Microsoft
Generated by DocFX