public WebTiledLayer()
{
//This default layer's spatial reference
SpatialReference = new SpatialReference(Wkid);
//Full extent fo the layer
base.FullExtent = new Envelope(-CornerCoordinate, -CornerCoordinate, CornerCoordinate, CornerCoordinate)
{
SpatialReference = SpatialReference
};
//Set up tile information. Each tile is 256x256px, 19 levels.
TileInfo = new TileInfo
{
Height = 256,
Width = 256,
Origin = new MapPoint(-CornerCoordinate, CornerCoordinate) { SpatialReference = SpatialReference },
SpatialReference = SpatialReference,
Lods = new Lod[19]
};
//Set the resolutions for each level. Each level is half the resolution of the previous one.
double resolution = CornerCoordinate * 2 / 256;
for (int i = 0; i < TileInfo.Lods.Length; i++)
{
TileInfo.Lods[i] = new Lod { Resolution = resolution };
resolution /= 2;
}
}