MapsCloudClient¶
Namespace: ThinkGeo.Core
A class provides the methods to access the WorldImagery APIs.
public class MapsCloudClient : CloudClient, System.IDisposable
Inheritance Object → CloudClient → MapsCloudClient
Implements IDisposable
Remarks:
A class provides the methods to access the WorldImagery APIs.
Properties¶
TimeoutInSeconds¶
The request timeout, default 100 seconds
public int TimeoutInSeconds { get; set; }
Property Value¶
WebProxy¶
The proxy used for requesting a Web Response.
public IWebProxy WebProxy { get; set; }
Property Value¶
IWebProxy
ClientId¶
A GIS Server NativeConfidential client ID.
public string ClientId { get; set; }
Property Value¶
ClientSecret¶
A GIS Server NativeConfidential client secret.
public string ClientSecret { get; set; }
Property Value¶
BaseUris¶
Candidate Gis Server Uris. This collection must have one uri at least before sending any request.
public Collection<Uri> BaseUris { get; }
Property Value¶
Constructors¶
MapsCloudClient()¶
Initilizes an instance. You need apply client Id and secret by properties.
public MapsCloudClient()
MapsCloudClient(String, String)¶
Initializes an instance with ClientID and ClientSecret.
public MapsCloudClient(string clientId, string clientSecret)
Parameters¶
clientId
String
The ClientID for the auth.
clientSecret
String
The ClientSecret for the auth.
Exceptions¶
ArgumentNullException
Thrown when the or is null.
Methods¶
GetRasterTile(Int64, Int64, Int64, CloudMapProjection, CloudRasterMapType, CloudTileSize, TileResolution)¶
Get a World Imagery tile by XYZ.
public Stream GetRasterTile(long z, long x, long y, CloudMapProjection projection, CloudRasterMapType mapType, CloudTileSize tileSize, TileResolution tileResolution)
Parameters¶
z
Int64
The Z value (zoom level) of the tile to get.
x
Int64
The X value (matrix column) of the tile to get.
y
Int64
The Y value (matrix row) of the tile to get.
projection
CloudMapProjection
The projection to generate the tile.
mapType
CloudRasterMapType
The raster map type
tileSize
CloudTileSize
The tile size
tileResolution
TileResolution
The quality of tile image
Returns¶
Stream
stream of image
GetRasterTileAsync(Int64, Int64, Int64, CloudMapProjection, CloudRasterMapType, CloudTileSize, TileResolution)¶
Get a World Imagery tile by XYZ.
public Task<Stream> GetRasterTileAsync(long z, long x, long y, CloudMapProjection projection, CloudRasterMapType mapType, CloudTileSize tileSize, TileResolution tileResolution)
Parameters¶
z
Int64
The Z value (zoom level) of the tile to get.
x
Int64
The X value (matrix column) of the tile to get.
y
Int64
The Y value (matrix row) of the tile to get.
projection
CloudMapProjection
The projection to generate the tile.
mapType
CloudRasterMapType
The raster map type
tileSize
CloudTileSize
The tile size
tileResolution
TileResolution
The quality of tile image
Returns¶
Task<Stream>
stream of image
GetVectorTile(Int64, Int64, Int64, CloudMapProjection)¶
Get a World Streets vector tile by XYZ.
public Stream GetVectorTile(long z, long x, long y, CloudMapProjection projection)
Parameters¶
z
Int64
The Z value (zoom level) of the tile to get.
x
Int64
The X value (matrix column) of the tile to get.
y
Int64
The Y value (matrix row) of the tile to get.
projection
CloudMapProjection
The projection to generate the tile.
Returns¶
Stream
An MVT vector tile encoded as protobufs (PBF) and gzipped.
GetVectorTileAsync(Int64, Int64, Int64, CloudMapProjection)¶
Get a World Streets vector tile by XYZ.
public Task<Stream> GetVectorTileAsync(long z, long x, long y, CloudMapProjection projection)
Parameters¶
z
Int64
The Z value (zoom level) of the tile to get.
x
Int64
The X value (matrix column) of the tile to get.
y
Int64
The Y value (matrix row) of the tile to get.
projection
CloudMapProjection
The projection to generate the tile.
Returns¶
Task<Stream>
An MVT vector tile encoded as protobufs (PBF) and gzipped.
Events¶
GettingAccessToken¶
Occurs before getting an AccessToken.
public event EventHandler<GettingAccessTokenEventArgs> GettingAccessToken;
SendingWebRequest¶
Occurs before sending a web request.
public event EventHandler<SendingWebRequestEventArgs> SendingWebRequest;
SentWebRequest¶
Occurs after the response of a web request is gotten.
public event EventHandler<SentWebRequestEventArgs> SentWebRequest;