Skip to content

WebApiExtentHelper

Namespace: ThinkGeo.UI.WebApi

Provides some extent helper methods for getting BBox of XYZ tile.

public static class WebApiExtentHelper

Inheritance ObjectWebApiExtentHelper

Methods

GetBoundingBoxForXyz(Int64, Int64, Int32, GeographyUnit)

Gets the BBox for xyz tile.

public static RectangleShape GetBoundingBoxForXyz(long x, long y, int z, GeographyUnit mapUnit)

Parameters

x Int64
The value of x.

y Int64
The value of y.

z Int32
The value of z.

mapUnit GeographyUnit
The unit of geography.

Returns

RectangleShape
The BBox of the tile, which is an instance of

GetBoundingBoxForXyz(Int64, Int64, Int32, GeographyUnit, TileMatrix)

Gets the BBox for xyz tile.

public static RectangleShape GetBoundingBoxForXyz(long x, long y, int z, GeographyUnit mapUnit, TileMatrix tileMatrix)

Parameters

x Int64
The value of x.

y Int64
The value of y.

z Int32
The value of z.

mapUnit GeographyUnit
The unit of geography.

tileMatrix TileMatrix
The tile matrix for calculating the tile system.

Returns

RectangleShape
The BBox of the tile, which is an instance of

GetBoundingBoxForXyz(Int64, Int64, Int32, GeographyUnit, ZoomLevelSet)

Gets the BBox for xyz tile.

public static RectangleShape GetBoundingBoxForXyz(long x, long y, int z, GeographyUnit mapUnit, ZoomLevelSet zoomLevelSet)

Parameters

x Int64
The value of x.

y Int64
The value of y.

z Int32
The value of z.

mapUnit GeographyUnit
The unit of geography.

zoomLevelSet ZoomLevelSet
The ZoomLevel collection.

Returns

RectangleShape
The BBox of the tile, which is an instance of

GetBoundingBoxForXyz(Int64, Int64, Int32, GeographyUnit, ZoomLevelSet, TileMatrix)

Gets the BBox for xyz tile.

public static RectangleShape GetBoundingBoxForXyz(long x, long y, int z, GeographyUnit mapUnit, ZoomLevelSet zoomLevelSet, TileMatrix tileMatrix)

Parameters

x Int64
The value of x.

y Int64
The value of y.

z Int32
The value of z.

mapUnit GeographyUnit
The unit of geography.

zoomLevelSet ZoomLevelSet
The ZoomLevel collection.

tileMatrix TileMatrix
The tile matrix for calculating the tile system.

Returns

RectangleShape
The BBox of the tile, which is an instance of

GetBoundingBoxForXyz(Int64, Int64, Int32, Int32, Int32, GeographyUnit, ZoomLevelSet, TileMatrix)

Gets the BBox for xyz tile.

public static RectangleShape GetBoundingBoxForXyz(long x, long y, int z, int tileWidth, int tileHeight, GeographyUnit mapUnit, ZoomLevelSet zoomLevelSet, TileMatrix tileMatrix)

Parameters

x Int64
The value of x.

y Int64
The value of y.

z Int32
The value of z.

tileWidth Int32
The width of tile.

tileHeight Int32
The height of tile.

mapUnit GeographyUnit
The unit of geography.

zoomLevelSet ZoomLevelSet
The ZoomLevel collection.

tileMatrix TileMatrix
The tile matrix for calculating the tile system.

Returns

RectangleShape
The BBox of the tile, which is an instance of

GetSnappedScale(RectangleShape, Double, GeographyUnit)

internal static double GetSnappedScale(RectangleShape worldExtent, double screenWidth, GeographyUnit worldExtentUnit)

Parameters

worldExtent RectangleShape

screenWidth Double

worldExtentUnit GeographyUnit

Returns

Double

GetSnappedZoomLevelIndex(Double, GeographyUnit)

internal static int GetSnappedZoomLevelIndex(double scale, GeographyUnit geographyUnit)

Parameters

scale Double

geographyUnit GeographyUnit

Returns

Int32