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/02/07 17:03]
benbai [Samples]
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 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. ​+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. ​ Check out this [[ThinkGeo Cloud .NET SDK Quick Start Guide|Quick Start Guide]] to get started. ​
Line 6: Line 6:
 ==== APIs ==== ==== APIs ====
  
-ThinkGeo Cloud .NET SDK wraps all the [[https://​cloud.thinkgeo.com/​help/​|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:+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 project. The complete APIs are listed ​[[thinkgeo_cloud_.net_client_apis|here]] and below are code snippets as samples:
    
 === Elevation === === 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>​
Line 18: Line 17:
 <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); var result = geocodingClient.SearchAsync(searchText,​ options);
 </​code>​ </​code>​
Line 25: Line 23:
 <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>​
Line 31: Line 28:
 <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=== === Raster and Vector Tile===
 <code csharp> <code csharp>
-MapsClient client = new MapsClient("clientId""clientSecret");+MapsClient client = new MapsClient(clientId,​ clientSecret);​
 Stream imageStream = client.GetRasterTile(z,​ x, y, projection, mapType, tileSize, tileResolution);​ Stream imageStream = client.GetRasterTile(z,​ x, y, projection, mapType, tileSize, tileResolution);​
 Task<​Stream>​ task = client.GetRasterTileAsync(z,​ x, y, projection, mapType, tileSize, tileResolution);​ Task<​Stream>​ task = client.GetRasterTileAsync(z,​ x, y, projection, mapType, tileSize, tileResolution);​
Line 50: Line 45:
  
 <code csharp> <code csharp>
-ThinkGeoCloudMapsOverlay ​transparentBackgroundMap ​= new ThinkGeoCloudMapsOverlay()+ThinkGeoCloudMapsOverlay ​backgroundMap ​= new ThinkGeoCloudMapsOverlay(clientId, clientSecret);
-transparentBackgroundMap.Name = "​Transparent Background";​ +
-transparentBackgroundMap.WrapDateline = WrapDatelineMode.WrapDateline;​ +
-transparentBackgroundMap.MapType = ThinkGeoCloudMapsMapType.TransparentBackground;+
 </​code>​ </​code>​
  
-Here below is an example ​for rending Vector Tiles on a Desktop map (WPF)+Below is an example ​of rending Vector Tiles on a Desktop map (WPF)
  
 ==== Samples ==== ==== Samples ====
-The following samples work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.+The following samples work in all of the Map Suite controls such as WPF, Web, MVC, WebApi, Android and iOS.
  
 === Elevation === === Elevation ===
-This Sample demonstrates how you can use ThinkGeo Cloud Client ​to get elevation data from ThinkGeo GIS Serverand shows the elevation data of a road in the form of a line chart.+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|Screenshot}}]]+[[https://​github.com/​ThinkGeo/​ThinkGeoCloudElevationSample-ForWpf|{{https://​github.com/​ThinkGeo/​ThinkGeoCloudElevationSample-ForWpf/​raw/​master/​Screenshot.gif?​nolink&​500*300}}]]
  
-==== ThinkGeo Cloud Elevation Sample for Wpf ==== 
  
 +=== Geocoding ===
 +This Sample demonstrates how you can use ThinkGeo Cloud to convert a geographic location into meaningful addresses from ThinkGeo'​s GIS Server. It ships with an optimized set of worldwide coverage of cities and towns but any customized data can be supported as well.  ​
  
-===== Sample Code =====+[[https://​github.com/​ThinkGeo/​ThinkGeoCloudGeocodingSample-ForWpf|{{https://​github.com/​ThinkGeo/​ThinkGeoCloudGeocodingSample-ForWpf/​raw/​master/​Screenshot.gif?​nolink&​500*300}}]]
  
-==== ThinkgeoMaps ==== 
  
 +=== 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.  ​
  
 +[[https://​github.com/​ThinkGeo/​ThinkGeoCloudReverseGeocodingSample-ForWpf|{{https://​github.com/​ThinkGeo/​ThinkGeoCloudReverseGeocodingSample-ForWpf/​raw/​master/​Screenshot.gif?​nolink&​500*300}}]]
  
  
  
-===== Screenshots ===== +=== 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/​ThinkGeoCloudReverseGeocodingSample-ForWpf/​raw/​master/​Screenshot.gif?​500|Screenshot}} +
-\\ +
- +
-</​div>​ +
- +
-<div medialist imagewithremaker>​ +
-{{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>​+
  
-<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.1549559006.txt.gz · Last modified: 2019/02/07 17:03 by benbai