User Tools

Site Tools


thinkgeo_cloud_.net_sdk

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
thinkgeo_cloud_.net_sdk [2019/01/29 10:12]
tgwikiupdate
thinkgeo_cloud_.net_sdk [2019/08/13 17:06] (current)
benbai
Line 1: Line 1:
 ====== ThinkGeo Cloud .NET SDK ====== ====== ThinkGeo Cloud .NET SDK ======
 +ThinkGeo Cloud .NET SDK helps developers use the ThinkGeo Cloud APIs in their .NET applications. You can use ThinkGeo Cloud APIs through standard RESTful API calls from any platform or any language and while you aren't required to use this SDK it will make the job easier when used in conjunction with ThinkGeo Cloud on a .NET project. ​
  
 +Check out this [[ThinkGeo Cloud .NET SDK Quick Start Guide|Quick Start Guide]] to get started. ​
  
 +==== APIs ====
  
-===== Services ===== +ThinkGeo Cloud .NET SDK wraps all the [[https://​cloud.thinkgeo.com/​help/​|ThinkGeo Cloud RESTful ​APIs]] ​and makes it simpler to use for a .NET projectThe complete APIs are listed ​[[thinkgeo_cloud_.net_client_apis|here]] and below are code snippets as samples: 
- +  
- +=== Elevation ===
- +
-ThinkGeo Cloud includes the following Services +
- +
-More Services are on the way.  +
- +
-The full API list can be found here:  +
- +
-[[https://​cloud.thinkgeo.com/​help/​|ThinkGeo Cloud APIs]] +
- +
-<div samplelist>​ +
-<faicon fa fa-navicon fa-lg> [[thinkgeo_cloud_vector_tile_.net_sdk|Vector Tile]] +
-\\ +
-Consume XYZ vector map tiles +
-</​div>​ +
- +
-<div samplelist>​ +
-<faicon fa fa-navicon fa-lg> [[thinkgeo_cloud_raster_tile_.net_sdk|Raster Tile]] +
-\\ +
-Consume XYZ raster map tiles +
-</​div>​ +
- +
- +
-<div samplelist>​ +
-<faicon fa fa-navicon fa-lg> [[thinkgeo_cloud_wms_.net_sdk|WMS]] +
-\\ +
-WMS service +
-</​div>​ +
- +
-<div samplelist>​ +
-<faicon fa fa-navicon fa-lg> [[thinkgeo_cloud_elevation_.net_sdk|Elevation]] +
-\\ +
-Get elevation information of specified geometries +
-</​div>​ +
- +
-<div samplelist>​ +
-<faicon fa fa-navicon fa-lg> [[thinkgeo_cloud_geocoding_.net_sdk|Geocoding]] +
-\\ +
-Get the location from US address +
-</​div>​ +
- +
-<div samplelist>​ +
-<faicon fa fa-navicon fa-lg> [[thinkgeo_cloud_reverse_geocoding_.net_sdk|Reverse Geocoding]] +
-\\ +
-Get the real world information of specified geometries +
-</​div>​ +
- +
-<div samplelist>​ +
-<faicon fa fa-navicon fa-lg> [[thinkgeo_cloud_reprojection_.net_sdk|Reprojection]] +
-\\ +
-Reproject the specified geometries +
-</​div>​ +
- +
-<div samplelist>​ +
-<faicon fa fa-navicon fa-lg> ​[[thinkgeo_cloud_color_.net_sdk|Color]] +
-\\ +
-Get related colors of specified color +
-</​div>​ +
- +
- +
- +
- +
-===== Sample Code ===== +
- +
-==== ThinkgeoMaps ==== +
- +
-<code csharp> +
-ThinkGeoCloudMapsOverlay transparentBackgroundMap = new ThinkGeoCloudMapsOverlay();​ +
-transparentBackgroundMap.Name = "​Transparent Background";​ +
-transparentBackgroundMap.WrapDateline = WrapDatelineMode.WrapDateline;​ +
-transparentBackgroundMap.MapType = ThinkGeoCloudMapsMapType.TransparentBackground;​ +
-</​code>​ +
-<code csharp>​ +
-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);​ +
-</​code>​ +
-==== Elevation ​====+
 <code csharp> <code csharp>
 ElevationClient elevationClient = new ElevationClient(clientId,​ clientSecret);​ ElevationClient elevationClient = new ElevationClient(clientId,​ clientSecret);​
-elevationClient.BaseUris.Add(new Uri(GisServerUri));​ 
 var response = elevationClient.GetElevationOfLineAsync(line,​ 3857, numberOfSegments:​ pointNumber,​ elevationUnit:​ DistanceUnit.Meter);​ var response = elevationClient.GetElevationOfLineAsync(line,​ 3857, numberOfSegments:​ pointNumber,​ elevationUnit:​ DistanceUnit.Meter);​
 </​code>​ </​code>​
-==== Geocoding ​====+ 
 +=== Geocoding ===
 <code csharp> <code csharp>
 GeocodingClient geocodingClient = new GeocodingClient(clientId,​ clientSecret);​ GeocodingClient geocodingClient = new GeocodingClient(clientId,​ clientSecret);​
-geocodingClient.BaseUris.Add(new Uri(GisServerUri));​ +var result = geocodingClient.SearchAsync(searchText,​ options);
-result = geocodingClient.SearchAsync(searchText,​ options);+
 </​code>​ </​code>​
  
-==== Reverse Geocoding ​====+=== Reverse Geocoding ===
 <code csharp> <code csharp>
 ReverseGeocodingClient reverseGeocodingClient = new ReverseGeocodingClient(clientId,​ clientSecret);​ 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);​ ReverseGeocodingResult searchResult = await reverseGeocodingClient.SearchPointAsync(searchPoint.X,​ searchPoint.Y,​ 3857, searchRadius,​ DistanceUnit.Meter,​ reverseGeocodingOption);​
 </​code>​ </​code>​
-==== Color ====+=== Color ===
 <code csharp> <code csharp>
 ColorClient colorClient = new ColorClient(clientId,​ clientSecret);​ ColorClient colorClient = new ColorClient(clientId,​ clientSecret);​
-colorClient.BaseUris.Add(new Uri(GisServerUri));​ 
 var hueColors = colorClient.GetColorsInHueFamily(specifiedColor,​ numberOfColors);​ var hueColors = colorClient.GetColorsInHueFamily(specifiedColor,​ numberOfColors);​
 </​code>​ </​code>​
-==== Projection ​====+=== Projection ===
 <code csharp> <code csharp>
-ProjectionClient projectionClient = new ProjectionClient(apiKeyapiSecret);​ +ProjectionClient projectionClient = new ProjectionClient(clientIdclientSecret);
-projectionClient.BaseUris.Add(new Uri(GisServerUri));+
 var projectedFeature = projectionClient.Project(feature,​ fromSrid, toSrid); var projectedFeature = projectionClient.Project(feature,​ fromSrid, toSrid);
 </​code>​ </​code>​
 +=== Raster and Vector Tile===
 +<code csharp>
 +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);​
 +</​code>​
 +
 +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):
 +
 +<code csharp>
 +ThinkGeoCloudMapsOverlay backgroundMap = new ThinkGeoCloudMapsOverlay(clientId,​ clientSecret);​
 +</​code>​
 +
 +Below is an example of 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 to get elevation data from ThinkGeo'​s GIS Server and it also shows the elevation data of a road in the form of a line chart.
 +
 +[[https://​github.com/​ThinkGeo/​ThinkGeoCloudElevationSample-ForWpf|{{https://​github.com/​ThinkGeo/​ThinkGeoCloudElevationSample-ForWpf/​raw/​master/​Screenshot.gif?​nolink&​500*300}}]]
  
  
-===== Screenshots ===== +=== Geocoding ​=== 
-<div medialist imagewithremaker>​ +This Sample demonstrates how you can use ThinkGeo ​Cloud to convert a geographic location into meaningful addresses from ThinkGeo'​s GIS ServerIt ships with an optimized set of worldwide coverage of cities and towns but any customized data can be supported as well.  ​
-{{https://​github.com/​ThinkGeo/​ThinkGeoCloudElevationSample-ForWpf/​raw/​master/​Screenshot.gif?​500|Screenshot}} +
-\\+
  
-</div>+[[https://​github.com/​ThinkGeo/​ThinkGeoCloudGeocodingSample-ForWpf|{{https://​github.com/​ThinkGeo/​ThinkGeoCloudGeocodingSample-ForWpf/​raw/​master/​Screenshot.gif?​nolink&​500*300}}]]
  
-<div medialist imagewithremaker>​ 
-{{https://​github.com/​ThinkGeo/​ThinkGeoCloudReverseGeocodingSample-ForWpf/​raw/​master/​Screenshot.gif?​500|Screenshot}} 
-\\ 
  
-</​div>​+=== Reverse Geocoding === 
 +This Sample demonstrates how you can use ThinkGeo Cloud to acquire an address from a set of location coordinates. ​ It ships with an optimized set of worldwide coverage of cities and towns but any customized data can be supported as well.  ​
  
-<div medialist imagewithremaker>​ +[[https://​github.com/​ThinkGeo/​ThinkGeoCloudReverseGeocodingSample-ForWpf|{{https://​github.com/​ThinkGeo/​ThinkGeoCloudReverseGeocodingSample-ForWpf/​raw/​master/​Screenshot.gif?​nolink&500*300}}]]
-{{https://​github.com/​ThinkGeo/​ThinkGeoCloudMapsSample-ForWpf/​raw/​master/​Screenshot.gif?​500|Screenshot}} +
-\\+
  
-</​div>​ 
  
-<div medialist imagewithremaker>​ 
-{{https://​github.com/​ThinkGeo/​ThinkGeoCloudGeocodingSample-ForWpf/​raw/​master/​Screenshot.gif?​500|Screenshot}} 
-\\ 
  
-</​div>​+=== Color Generator === 
 +This Sample demonstrates how you can use ThinkGeo Cloud to generate sets of related colors ideal for customizing map themes and enhancing other visual elements of your mapping projects.
  
-<div medialist imagewithremaker>​ +[[https://​github.com/​ThinkGeo/​ThinkGeoCloudColorSample-ForWpf|{{https://​github.com/​ThinkGeo/​ThinkGeoCloudColorSample-ForWpf/​raw/​master/​Screenshot.gif?​nolink&500*300}}]]
-{{https://​github.com/​ThinkGeo/​ThinkGeoCloudColorSample-ForWpf/​raw/​master/​Screenshot.gif?​500|Screenshot}} +
-\\+
  
-</​div>​ 
  
thinkgeo_cloud_.net_sdk.1548756741.txt.gz · Last modified: 2019/01/29 10:12 by tgwikiupdate