User Tools

Site Tools


thinkgeo_cloud_.net_sdk

This is an old revision of the document!


ThinkGeo Cloud .NET SDK

ThinkGeo Cloud .NET SDK helps developers use the ThinkGeo Cloud APIs in their .NET applications. You can use ThinkGeo Cloud API through standard RESTful API calls from any platforms any language and don't have to use this SDK at all. It's just to make your job a bit easier when with ThinkGeo Cloud on a .NET project.

Check out this Quick Start Guide to get started.

APIs

ThinkGeo Cloud .NET SDK wraps all the ThinkGeo Cloud RESTful APIs and make it simpler to use from a .NET project. The complete APIs are listed here and below are code snippets as samples:

Elevation

ElevationClient elevationClient = new ElevationClient(clientId, clientSecret);
elevationClient.BaseUris.Add(new Uri(GisServerUri));
var response = elevationClient.GetElevationOfLineAsync(line, 3857, numberOfSegments: pointNumber, elevationUnit: DistanceUnit.Meter);

Geocoding

GeocodingClient geocodingClient = new GeocodingClient(clientId, clientSecret);
geocodingClient.BaseUris.Add(new Uri(GisServerUri));
var result = geocodingClient.SearchAsync(searchText, options);

Reverse Geocoding

ReverseGeocodingClient reverseGeocodingClient = new ReverseGeocodingClient(clientId, clientSecret);
reverseGeocodingClient.BaseUris.Add(new Uri(GisServerUri));
ReverseGeocodingResult searchResult = await reverseGeocodingClient.SearchPointAsync(searchPoint.X, searchPoint.Y, 3857, searchRadius, DistanceUnit.Meter, reverseGeocodingOption);

Color

ColorClient colorClient = new ColorClient(clientId, clientSecret);
colorClient.BaseUris.Add(new Uri(GisServerUri));
var hueColors = colorClient.GetColorsInHueFamily(specifiedColor, numberOfColors);

Projection

ProjectionClient projectionClient = new ProjectionClient(apiKey, apiSecret);
projectionClient.BaseUris.Add(new Uri(GisServerUri));
var projectedFeature = projectionClient.Project(feature, fromSrid, toSrid);

Raster and Vector Tile

MapsClient client = new MapsClient("clientId", "clientSecret");
Stream imageStream = client.GetRasterTile(z, x, y, projection, mapType, tileSize, tileResolution);
Task<Stream> task = client.GetRasterTileAsync(z, x, y, projection, mapType, tileSize, tileResolution);

Not only we have APIs to get one single Vector Tile or Raster Tile, but we also provide a much simpler way in ThinkGeo UI Components as following to render the tiles on the map. Here below is an example for rending RasterTiles on a Desktop map (WPF):

ThinkGeoCloudMapsOverlay transparentBackgroundMap = new ThinkGeoCloudMapsOverlay();
transparentBackgroundMap.Name = "Transparent Background";
transparentBackgroundMap.WrapDateline = WrapDatelineMode.WrapDateline;
transparentBackgroundMap.MapType = ThinkGeoCloudMapsMapType.TransparentBackground;

Here below is an example for rending Vector Tiles on a Desktop map (WPF)

Samples

The following samples work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

Elevation

This Sample demonstrates how you can use ThinkGeo Cloud Client to get elevation data from ThinkGeo GIS Server, and shows the elevation data of a road in the form of a line chart.

Screenshot

ThinkGeo Cloud Elevation Sample for Wpf

Sample Code

ThinkgeoMaps

Screenshots

Screenshot

Screenshot

Screenshot

Screenshot

thinkgeo_cloud_.net_sdk.1549558726.txt.gz · Last modified: 2019/02/07 16:58 by benbai