User Tools

Site Tools


thinkgeo_cloud_geocoding

This is an old revision of the document!


ThinkGeo Cloud Geocoding

ThinkGeo Cloud Geocoding provides RESTful APIs to find the Geolocation from an address in the United States. Check out the online sample for a quick look.

RESTful APIs

* Try it Online: All the ThinkGeo Cloud RESTful APIs can be tested online following the instructions below:

ThinkGeo Cloud Geocoding provides the following 2 Restful APIs:

<!-- Get location from an address -->
HTTP GET 
https://cloud.thinkgeo.com/api/v1/location/geocode/{searchText}

URL Parameters

  • searchText: The address to be geocoded.
  • locationType: Optional. Specifies what types of locations will be considered a match. Possible values are Address, Street, State, City, County, Zipcode, Country. Defaults to Default.
  • fuzzyMatch: Optional. Specifies whether to attempt approximate, as well as exact, matching when performing geocodes. Defaults to false.
  • maxResults: Optional. The maximum number of possible matches to return, if multiple candidates are found. Defaults to 10.
  • verboseResults: Optional. Indicates whether the results should be verbose or not. When false, the results will have fewer properties. Defaults to false.
  • srid: Optional. The SRID (coordinate system ID) in which to express the result. Mutually exclusive from the Proj4String parameter.
  • proj4String: Optional. The Proj4 projection string (coordinate system) in which to express the result. Mutually exclusive from the Srid parameter. Defaults to “+proj=longlat +datum=WGS84 +no_defs”.
<!-- Get locations from multiple addresses -->
HTTP POST
https://cloud.thinkgeo.com/api/v1/location/geocode/multi

Parameters

/* POST parameters, if a parameter specified in both POST and GET, the value from POST parameter will be applied. */
[
  {
    "searchText": "string", // Free-form text representing the address or location to be geocoded.
    "locationType": "string", // Optional. Specifies what types of locations will be considered a match. Possible values are Address, Street, State, City, County, Postcode, Zipcode, Country. Defaults to all types.
    "fuzzyMatch": bool, // Optional. Specifies whether to attempt approximate, as well as exact, matching when performing geocodes. Defaults to false.
    "maxResults": int, // Optional. The maximum number of possible matches to return, if multiple candidates are found. Defaults to 20.
    "verboseResults": bool, // Optional. Indicates whether the results should be verbose or not. When false, the results will have fewer properties. Defaults to false.
    "srid": int, // Optional. The SRID (coordinate system ID) in which to express the result. Mutually exclusive from the Proj4String parameter.
    "proj4String": "string" // Optional. The Proj4 projection string (coordinate system) in which to express the result. Mutually exclusive from the Srid parameter. Defaults to "+proj=longlat +datum=WGS84 +no_defs".
  }
]
  • locationType: Optional. Specifies what types of locations will be considered a match. Possible values are Address, Street, State, City, County, Zipcode, Country. Defaults to Default.
  • fuzzyMatch: Optional. Specifies whether to attempt approximate, as well as exact, matching when performing geocodes. Defaults to false.
  • maxResults: Optional. The maximum number of possible matches to return, if multiple candidates are found. Defaults to 10.
  • verboseResults: Optional. Indicates whether the results should be verbose or not. When false, the results will have fewer properties. Defaults to false.
  • srid: Optional. The SRID (coordinate system ID) in which to express the result. Mutually exclusive from the Proj4String parameter.
  • proj4String: Optional. The Proj4 projection string (coordinate system) in which to express the result. Mutually exclusive from the Srid parameter. Defaults to “+proj=longlat +datum=WGS84 +no_defs”.

Consume from Client Side

ThinkGeo Cloud Geocoding does not allow anonymous users to access the API. Before working with these APIs, you will need to register with ThinkGeo Cloud and create your own clients. A new account comes with two clients: NativeConfidential and JavaScript. See more details at here.

ThinkGeo Cloud provides standard RESTful APIs which can be consumed on any platform through any language. ThinkGeo also offers two prepackaged API clients to make it easier to integrate into .NET and JavaScript applications.

SDK for .NET

The SDK for .NET enables developers to build .NET applications that use the ThinkGeo Cloud services. The NuGet package can be found at ThinkGeo.Cloud.Client or you can install this package with PM by running the command: Install-Package ThinkGeo.Cloud.Client -Version VERSION_TO_BE_INSTALLED, here is the complete API List. Also you can check out ThinkGeoCloudGeocodingSample-ForWpf for a a jump-start.

API Documentation

  • ThinkGeo.Cloud.GeocodingClient

    This documentation covers the ThinkGeo.Cloud.GeocodingClient class. It contains all of the members such as Constructors, Methods, Properties and Events.

SDK for JavaScript

The SDK for JavaScript enables developers to directly access ThinkGeo Cloud services from JavaScript code running in brower. This SDK can be found at thinkgeocloudclient-js. The Geocoding sample shows how to work with this SDK.

thinkgeo_cloud_geocoding.1552023087.txt.gz · Last modified: 2019/03/08 05:31 by tgwikiupdate