User Tools

Site Tools


thinkgeo_cloud_javascript_sdk_api

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_javascript_sdk_api [2019/01/22 09:39]
johnnyz
— (current)
Line 1: Line 1:
-====== ThinkGeoCloudClient-js ====== 
- 
-===== NameSapce ===== 
- 
-<div cloud_client_description>​**tg** is short for ThinkGeo, the namespace of ThinkGeoCloudClient-js</​div>​ 
- 
-===== tg.ColorClient ===== 
-<div cloud_client_description>​A class provides the methods to access the ColorUtilities APIs. Generats an diversified family of colors by an input color or a random base color.</​div>​ 
- 
-<div cloud_client_synta>​Syntax</​div> ​ 
- 
-<code javascript>​ 
-var colorClient = new tg.ColorClient('​Your-Cloud-Service-Api-Key'​);​ 
-</​code>​ 
-<div cloud_client_parameter>​Parameters</​div> ​ 
-<div cloud_client_table>​ 
-^Name  ^Type  ^Description ​ ^ 
-|apiKey ​ |string ​ | An API key for access to ThinkGeo Cloud services, it can be created following the  [[http://​wiki.thinkgeo.com/​wiki/​thinkgeo_cloud_quick_start_guide|guide]] ​ | 
-</​div>​ 
- 
-<div cloud_client_synta>​Return Value </​div> ​ 
-<div cloud_client_description>​a color object to access the ColorUtilities APIs in ThinkGeo Cloud service.</​div>​ 
- 
-<div cloud_client_method>​ colorClient.getColorsInAnalogousFamily(options,​ callback) </​div>​ 
-<div cloud_client_description>​Get a family of colors based on three analogous hues. </​div>​ 
-<div cloud_client_synta>​Syntax </​div> ​ 
-<code javascript>​ 
-  var options = { 
-      numberOfColors:​ 25 
-  }; 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  colorClient.getColorsInAnalogousFamily(options,​ callback); 
-</​code>​ 
- 
-<div cloud_client_parameter>​Parameters ​ </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^    
-|<span cloud_client_name>​options</​span> ​ |Options ​ |  |             ​|  ​ 
-|         ​^Name ​    ​^Type ​ ^Default ​ ^Description ​ ^ 
-|         ​|<​span cloud_client_name>​numberOfColors</​span> ​  ​|number ​ |  |A number of output colors desired. The value must be between 3 and 54.  | 
-|         ​|<​span cloud_client_name>​color</​span> ​  ​|string ​ |  |A base color. Two analogous hues will be found for you. If null, use random color. ​ | 
-|         ​|<​span cloud_client_name>​outFormat</​span> ​  ​|string ​ |Hex  |The format in which you want the output colors. Supported formats: Hex, RGB, HSL.  | 
-|         ​|<​span cloud_client_name>​inFormat</​span> ​  ​|string ​ |Hex/​RGB ​ |The format of the inputColor. Supported formats: Hex, RGB, HSL. f unspecified,​ we will try to parse the inputColor as Hex first, then RGB.  | 
-|<span cloud_client_name>​callback</​span> ​  ​|function ​ |  |  |the callback for response ​ | 
-</​div>​ 
- 
- 
-<div cloud_client_method>​colorClient.getColorsInComplementaryFamily(options,​ callback) </​div>​ 
-<div cloud_client_description>​Get a family of colors based on two complementary hues. </​div>​ 
-<div cloud_client_synta>​ Syntax </​div> ​ 
-<code javascript>​ 
-  var options = { 
-      numberOfColors:​ 25 
-  }; 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  colorClient.getColorsInComplementaryFamily(options,​ callback); 
-</​code>​ 
- 
-<div cloud_client_parameter>​ Parameters </​div>​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^    
-|options ​ |Options ​ |  |             ​|  ​ 
-|         ​^Name ​    ​^Type ​ ^Default ​ ^Description ​ ^ 
-|         ​|numberOfColors ​ |number ​ |  |The total number of colors you want returned. The value must be between 2 and 36.  | 
-|         ​|color ​ |string ​ |  |A base color. A complementary hue will be found for you.  | 
-|         ​|outFormat ​ |string ​ |Hex  |The format in which you want the output colors. Supported formats: Hex, RGB, HSL.  | 
-|         ​|inFormat ​ |string ​ |Hex/​RGB ​ |The format of the inputColor. Supported formats: Hex, RGB, HSL. f unspecified,​ we will try to parse the inputColor as Hex first, then RGB.  | 
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-</​div>​ 
- 
- 
-<div cloud_client_method>​ colorClient.getColorsInContrastingFamily(options,​ callback) </​div>​ 
-<div cloud_client_description>​Get a family of colors based on two contrasting hues.</​div>​ 
-<div cloud_client_synta>​ Syntax </​div>​ 
-<code javascript>​ 
-  var options = { 
-      numberOfColors:​ 25 
-  }; 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  colorClient.getColorsInContrastingFamily(options,​ callback); 
-</​code>​ 
- 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^    
-|options ​ |Options ​ |  |             ​|  ​ 
-|         ​^Name ​    ​^Type ​ ^Default ​ ^Description ​ ^ 
-|         ​|numberOfColors ​ |number ​ |  |The total number of colors you want returned. The value must be between 2 and 36.  | 
-|         ​|color ​ |string ​ |  |A base color. A contrasting hue will be found for you.  | 
-|         ​|outFormat ​ |string ​ |Hex  |The format in which you want the output colors. Supported formats: Hex, RGB, HSL.  | 
-|         ​|inFormat ​ |string ​ |Hex/​RGB ​ |The format of the inputColor. Supported formats: Hex, RGB, HSL. f unspecified,​ we will try to parse the inputColor as Hex first, then RGB.  | 
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-</​div> ​ 
- 
-<div cloud_client_method>​ colorClient.getColorsInHueFamily(options,​ callback) </​div>​ 
-<div cloud_client_description>​Get a family of colors with the same hue and sequential variances in lightness and saturation.</​div>​ 
-<div cloud_client_synta>​ Syntax </​div>​ 
-<code javascript>​ 
-  var options = { 
-      numberOfColors:​ 25 
-  }; 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  colorClient.getColorsInHueFamily(options,​ callback); 
-</​code>​ 
- 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^    
-|options ​ |Options ​ |  |             ​|  ​ 
-|         ​^Name ​    ​^Type ​ ^Default ​ ^Description ​ ^ 
-|         ​|numberOfColors ​ |number ​ |  |The total number of colors you want returned. The value must be between 1 and 255.  | 
-|         ​|color ​ |string ​ |  |A base color. A contrasting hue will be found for you.  | 
-|         ​|outFormat ​ |string ​ |Hex  |The format in which you want the output colors. Supported formats: Hex, RGB, HSL.  | 
-|         ​|inFormat ​ |string ​ |Hex/​RGB ​ |The format of the inputColor. Supported formats: Hex, RGB, HSL. f unspecified,​ we will try to parse the inputColor as Hex first, then RGB.  | 
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-</​div> ​ 
- 
- 
-<div cloud_client_method>​ colorClient.getColorsInQualityFamily(options,​ callback) </​div>​ 
-<div cloud_client_description>​Get a family of colors with qualitative variances in hue, but similar lightness and saturation.</​div>​ 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
-<code javascript>​ 
-  var options = { 
-      numberOfColors:​ 25 
-  }; 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  colorClient.getColorsInQualityFamily(options,​ callback); 
-</​code>​ 
- 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^    
-|options ​ |Options ​ |  |             ​|  ​ 
-|         ​^Name ​    ​^Type ​ ^Default ​ ^Description ​ ^ 
-|         ​|numberOfColors ​ |number ​ |  |The total number of colors you want returned. The value must be between 1 and 255.  | 
-|         ​|color ​ |string ​ |  |The color on which you want to base the color collection. ​ | 
-|         ​|outFormat ​ |string ​ |Hex  |The format in which you want the output colors. Supported formats: Hex, RGB, HSL.  | 
-|         ​|inFormat ​ |string ​ |Hex/​RGB ​ |The format of the inputColor. Supported formats: Hex, RGB, HSL. f unspecified,​ we will try to parse the inputColor as Hex first, then RGB.  | 
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-</​div> ​ 
- 
- 
-<div cloud_client_method>​ colorClient.getColorsInTetradFamily(options,​ callback) </​div>​ 
-<div cloud_client_description>​Get a family of colors based on a harmonious tetrad of hues.</​div>​ 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
-<code javascript>​ 
-  var options = { 
-      numberOfColors:​ 25 
-  }; 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  colorClient.getColorsInTetradFamily(options,​ callback); 
-</​code>​ 
- 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^    
-|options ​ |Options ​ |  |             ​|  ​ 
-|         ​^Name ​    ​^Type ​ ^Default ​ ^Description ​ ^ 
-|         ​|numberOfColors ​ |number ​ |  |The total number of colors you want returned. The value must be between 4 and 72.  | 
-|         ​|color ​ |string ​ |  |A base color. Three harmonious hues will be found for you to create a tetrad. ​ | 
-|         ​|outFormat ​ |string ​ |Hex  |The format in which you want the output colors. Supported formats: Hex, RGB, HSL.  | 
-|         ​|inFormat ​ |string ​ |Hex/​RGB ​ |The format of the inputColor. Supported formats: Hex, RGB, HSL. f unspecified,​ we will try to parse the inputColor as Hex first, then RGB.  | 
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-</​div> ​ 
- 
- 
-<div cloud_client_method>​ colorClient.getColorsInTriadFamily(options,​ callback) </​div>​ 
-<div cloud_client_description>​Get a family of colors based on a harmonious triad of hues.</​div>​ 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
-<code javascript>​ 
-  var options = { 
-      numberOfColors:​ 25 
-  }; 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  colorClient.getColorsInTetradFamily(options,​ callback); 
-</​code>​ 
- 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^    
-|options ​ |Options ​ |  |             ​|  ​ 
-|         ​^Name ​    ​^Type ​ ^Default ​ ^Description ​ ^ 
-|         ​|numberOfColors ​ |number ​ |  |The number of colors you want returned. The value must be between 3 and 54.v  | 
-|         ​|color ​ |string ​ |  |The color on which you want to base the colors collections. ​ | 
-|         ​|outFormat ​ |string ​ |Hex  |The format in which you want the output colors. Supported formats: Hex, RGB, HSL.  | 
-|         ​|inFormat ​ |string ​ |Hex/​RGB ​ |The format of the inputColor. Supported formats: Hex, RGB, HSL. f unspecified,​ we will try to parse the inputColor as Hex first, then RGB.  | 
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-</​div> ​ 
- 
- 
-===== tg.ElevationClient===== 
-A class provides the methods to access the Elevation APIs. Get the elevation of a geometry, include point, line, polygon. 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
- 
-<code javascript>​ 
-var elevationClient = new tg.ElevationClient('​Your-Cloud-Service-Api-Key'​);​ 
-</​code>​ 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name  ^Type  ^Description ​ ^ 
-|apiKey ​ |string ​ | An API key for access to ThinkGeo Cloud services, it can be created following the  [[http://​wiki.thinkgeo.com/​wiki/​thinkgeo_cloud_quick_start_guide|guide]] ​ | 
-</​div> ​ 
- 
-<div cloud_client_synta> ​  ​Return Value </​div> ​ 
-<div cloud_client_description>​a elevation object to access the Elevation APIs in ThinkGeo Cloud service.</​div> ​ 
- 
-<div cloud_client_method>​ elevationClient.getElevationOfPoint(options,​ callback) </​div>​ 
-<div cloud_client_description>​Get the elevation of a point.</​div>​ 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
-<code javascript>​ 
-  var options = { 
-      pointY: 33.128367, ​ 
-      pointX:​-96.809847,​ 
-      srid: 4326, 
-      elevationUnit:'​Feet'​ 
-  }; 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  elevationClient.getElevationOfPoint(options,​ callback); 
-</​code>​ 
- 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^    
-|options ​ |Options ​ |  |             ​|  ​ 
-|         ​^Name ​    ​^Type ​ ^Default ​ ^Description ​ ^ 
-|         ​|pointY ​ |number ​ |  |The Y coordinate of the point. ​ | 
-|         ​|pointX ​ |number ​ |  |The X coordinate of the point. ​ | 
-|         ​|srid ​ |integer ​ |4326  |The SRID (coordinate system) of the input Point. ​ | 
-|         ​|proj4String ​ |string ​ |  |The Proj4 (coordinate system) of the input Point. ​ | 
-|         ​|elevationUnit ​ |string ​ |"​Feet" ​ |The unit of measure in which the elevation result is expressed. ​ | 
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-</​div> ​ 
- 
- 
-<div cloud_client_method>​ elevationClient.getElevationOfPoints(options,​ callback) </​div>​ 
-<div cloud_client_description>​Get the elevations of all the points in a collection (up to 1,000 points maximum).</​div>​ 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
-<code javascript>​ 
-   var options = { 
-      body:[ 
-            { 
-               "​coord":"​33.128367,​-96.809847",​ 
-               "​srid":​4326,​ 
-               "​elevationUnit":"​Meter"​ 
-            } 
-      ] 
-      srid: 4326, 
-      elevationUnit:'​Meter'​ 
-  }; 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  elevationClient.getElevationOfPoints(options,​ callback); 
-</​code>​ 
- 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^    
-|options ​ |Options ​ |  |             ​|  ​ 
-|         ​^Name ​    ​^Type ​ ^Default ​ ^Description ​ ^ 
-|         |body |array |  |A collection of point json, the srid, proj4String and elevationUnit can be individually specified for each point. ​ | 
-|         ​|srid ​ |integer ​ |4326  |The common SRID (coordinate system) for points which hasn't been specified. ​ | 
-|         ​|proj4String ​ |string ​ |  |The common Proj4 (coordinate system) for points which hasn't been specified. ​ | 
-|         ​|elevationUnit ​ |string ​ |"​Feet" ​ |The unit of measure in which the elevation result is expressed. ​ | 
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-</​div> ​ 
- 
- 
-<div cloud_client_method>​ elevationClient.getElevationOfLine(options,​ callback) </​div>​ 
-<div cloud_client_description>​Get the elevation of points along a line.</​div>​ 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
-<code javascript>​ 
- var options = { 
-      wkt: '​LINESTRING(-10717751.685805485 3864388.620499513,​-10717359.946035523 3864570.1584416907)',​ 
-      srid: 3857, 
-      numberOfSegments:​5,​ 
-      elevationUnit:'​Meter',​ 
-  }; 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  elevationClient.getElevationOfPoints(options,​ callback); 
-</​code>​ 
- 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^    
-|options ​ |Options ​ |  |             ​|  ​ 
-|         ​^Name ​    ​^Type ​ ^Default ​ ^Description ​ ^ 
-|         ​|wkt ​ |string ​ |  |The Well Known Text (WKT) of a line feature to get the elevation. ​ | 
-|         ​|srid ​ |integer ​ |4326  |The SRID (coordinate system) of the input line.  | 
-|         ​|proj4String ​ |string ​ |  |The Proj4String (coordinate system) of the input line.  | 
-|         ​|elevationUnit ​ |string ​ |"​Feet" ​ |The unit of measure in which the elevation result is expressed. ​ | 
-|         ​|numberOfSegments ​ |integer ​ |  |Splits the requested line into this many segments, then calculates elevation of each point joining the segments. ​ | 
-|         ​|IntervalDistance ​ |integer ​ |  |Splits the requested line into intervals of this length. The unit of measure for this distance is specified by the IntervalDistanceUnit parameter. ​ | 
-|         ​|IntervalDistanceUnit ​ |string ​ |"​Feet" ​ |The unit of measure in which the IntervalDistance is expressed. ​ | 
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-</​div> ​ 
- 
- 
-<div cloud_client_method>​ elevationClient.getGradeOfLine(options,​ callback) </​div>​ 
-<div cloud_client_description>​Get the grade (slope) of a line, optionally split into segments.</​div>​ 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
-<code javascript>​ 
- var options = { 
-      wkt: '​LINESTRING(-10717751.685805485 3864388.620499513,​-10717359.946035523 3864570.1584416907)',​ 
-      srid: 3857, 
-      numberOfSegments:​5,​ 
-      elevationUnit:'​Meter',​ 
-  }; 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  elevationClient.getGradeOfLine(options,​ callback); 
-</​code>​ 
- 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^    
-|options ​ |Options ​ |  |             ​|  ​ 
-|         ​^Name ​    ​^Type ​ ^Default ​ ^Description ​ ^ 
-|         ​|wkt ​ |string ​ |  |The Well Known Text(WKT) of the line feature to get the grade. ​ | 
-|         ​|srid ​ |integer ​ |4326  |The SRID (coordinate system) of the input line.  | 
-|         ​|proj4String ​ |string ​ |  |The Proj4String (coordinate system) of the input line.  | 
-|         ​|elevationUnit ​ |string ​ |"​Feet" ​ |The unit of measure in which the elevation result is expressed. ​ | 
-|         ​|numberOfSegments ​ |integer ​ |  |Splits the requested line into this many segments, then calculates elevation of each point joining the segments. ​ | 
-|         ​|IntervalDistance ​ |number ​  ​| ​ |Splits the requested line into intervals of this length. The unit of measure for this distance is specified by the IntervalDistanceUnit parameter. ​ | 
-|         ​|IntervalDistanceUnit ​ |string ​ |"​Feet" ​ |The unit of measure in which the IntervalDistance is expressed. ​ | 
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-</​div> ​ 
- 
- 
- 
-<div cloud_client_method>​ elevationClient.getElevationOfArea(options,​ callback) </​div>​ 
-<div cloud_client_description>​Get the elevation of a matrix of points within an area</​div>​ 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
-<code javascript>​ 
- var options = { 
-      wkt: '​POLYGON((-10717723.021919878 3864742.1417553322,​-10718038.324661555 3864426.839013656,​-10716901.323865812 3864503.2760419413,​-10717723.021919878 3864742.1417553322))',​ 
-      srid: 3857, 
-      numberOfSegments:​5,​ 
-      elevationUnit:'​Meter',​ 
-  }; 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  elevationClient.getElevationOfArea(options,​ callback); 
-</​code>​ 
- 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^    
-|options ​ |Options ​ |  |             ​|  ​ 
-|         ​^Name ​    ​^Type ​ ^Default ​ ^Description ​ ^ 
-|         ​|wkt ​ |string ​ |  |The Well Known Text (WKT) of a polygon feature to get the elevation. ​ | 
-|         ​|srid ​ |integer ​ |4326  |The SRID (coordinate system) of the input polygon. ​ | 
-|         ​|proj4String ​ |string ​ |  |The Proj4String (coordinate system) of the input polygon. ​ | 
-|         ​|elevationUnit ​ |string ​ |"​Feet" ​ |The unit of measure in which the elevation result is expressed. ​ | 
-|         ​|numberOfSegments ​ |integer ​ |  |Splits the requested line into this many segments, then calculates elevation of each point joining the segments. ​ | 
-|         ​|IntervalDistance ​ |number ​  ​|1000.0 ​ |The distance between every two points in the area matrix. Elevation of each point will be calculated and returned. Defaults to 1000.0. The unit of measure for this distance is specified by the IntervalDistanceUnit parameter. ​ | 
-|         ​|IntervalDistanceUnit ​ |string ​ |"​Feet" ​ |The unit of measure in which the IntervalDistance is expressed. ​ | 
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-</​div> ​ 
- 
- 
- 
- 
-===== tg.MapsClient ===== 
-A class provides the methods to access the WorldImagery APIs. 
- 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
- 
-<code javascript>​ 
-var mapClient = new tg.MapsClient ('​Your-Cloud-Service-Api-Key'​);​ 
-</​code>​ 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name  ^Type  ^Description ​ ^ 
-|apiKey ​ |string ​ | An API key for access to ThinkGeo Cloud services, it can be created following the  [[http://​wiki.thinkgeo.com/​wiki/​thinkgeo_cloud_quick_start_guide|guide]] ​ | 
-</​div> ​ 
- 
- 
-<div cloud_client_synta> ​  ​Return Value </​div> ​ 
-<div cloud_client_description>​ a map object to access the Map APIs in ThinkGeo Cloud service.</​div> ​ 
- 
- 
- 
- 
-<div cloud_client_method>​ mapClient.getRasterTile(options,​ callback) </​div>​ 
-<div cloud_client_description>​Get a Maps raster tile by XYZ.</​div>​ 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
-<code javascript>​ 
-  var options = { 
-      z: 3,  
-      x: 2, 
-      y: 3, 
-      projection: 3857, 
-      mapType:'​light',​ 
-      tileSize:​512 
-      tileResolution:​1 
-  }; 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  mapClient.getRasterTile(options,​ callback); 
-</​code>​ 
- 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^    
-|options ​ |Options ​ |  |             ​|  ​ 
-|         ​^Name ​    ​^Type ​ ^Default ​ ^Description ​ ^ 
-|         ​|z ​ |integer ​ |  |The Z value (zoom level) of the tile to get.  | 
-|         ​|x ​ |integer ​ |  |The X value (matrix column) of the tile to get.  | 
-|         ​|y ​ |integer ​ |  |The Y value (matrix row) of the tile to get.  | 
-|         ​|projection ​ |integer ​ |  |The SRID in which to generate the tile. Currently only “3857” is supported. ​ | 
-|         ​|mapType ​ |string ​ |  |The style for the requested tile, include '​light',​ '​dark',​ '​hybrid',​ '​aerial',​ '​transparentBackground' ​  | 
-|         ​|tileSize ​ |integer ​ |  |The size of the tile to be returned, include 512,​256. ​  | 
-|         ​|tileResolution ​ |integer ​ |  |The resolution for the request tile. include 1,2.   | 
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-</​div> ​ 
- 
-<div cloud_client_method>​ mapClient.getVectorTile(options,​ callback) </​div>​ 
-<div cloud_client_description>​Get a Maps Streets vector tile by XYZ.</​div>​ 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
-<code javascript>​ 
-  var options = { 
-      z: 3,  
-      x: 2, 
-      y: 3, 
-      projection: 3857 
-  }; 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  mapClient.getVectorTile(options,​ callback); 
-</​code>​ 
- 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^    
-|options ​ |Options ​ |  |             ​|  ​ 
-|         ​^Name ​    ​^Type ​ ^Default ​ ^Description ​ ^ 
-|         ​|z ​ |integer ​ |  |The Z value (zoom level) of the tile to get.  | 
-|         ​|x ​ |integer ​ |  |The X value (matrix column) of the tile to get.  | 
-|         ​|y ​ |integer ​ |  |The Y value (matrix row) of the tile to get.  | 
-|         ​|projection ​ |integer ​ |  |The SRID in which to generate the tile. Currently only “3857” is supported. ​ | 
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-</​div> ​ 
- 
- 
- 
- 
- 
- 
- 
-===== tg.ProjectionClient ===== 
-A class that provides the methods to access the GIS Server Projection APIs. Converts geometry in Well Known Text format from one spatial reference system to another. 
- 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
- 
-<code javascript>​ 
-var projectionClient = new tg.ProjectionClient('​Your-Cloud-Service-Api-Key'​);​ 
-</​code>​ 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name  ^Type  ^Description ​ ^ 
-|apiKey ​ |string ​ | An API key for access to ThinkGeo Cloud services, it can be created following the  [[http://​wiki.thinkgeo.com/​wiki/​thinkgeo_cloud_quick_start_guide|guide]] ​ | 
-</​div> ​ 
- 
-<div cloud_client_synta> ​  ​Return Value </​div> ​ 
-<div cloud_client_description>​a project object to access the Projection APIs in ThinkGeo Cloud service.</​div>​ 
- 
- 
- 
-<div cloud_client_method>​ projectionClient.project(options,​ callback) </​div>​ 
-<div cloud_client_description>​Converts a geometry from one spatial reference system to another.</​div>​ 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
-<code javascript>​ 
-  var options = { 
-    pointX: 31.9000, 
-    pointY: -55.0000, 
-    fromProj: 4326, 
-    toProj: 3857 
-  }; 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  projectionClient.project(options,​ callback); 
-</​code>​ 
- 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^    
-|options ​ |Options ​ |  |             ​|  ​ 
-|         ​^Name ​    ​^Type ​ ^Default ​ ^Description ​ ^ 
-|         ​|pointX ​ |number ​ |  |The X coordinate of the point. ​ | 
-|         ​|pointY ​ |number ​ |  |The Y coordinate of the point. ​ | 
-|         ​|wkt ​ |string ​ |  |The geometry that you want to reproject. ​ | 
-|         ​|body ​ |object |  |A request object containing the geometries to be reprojected,​ as well as input and output spatial reference systems. ​ | 
-|         ​|fromProj ​ |string ​ |  |The EPSG/ESRI ID or Proj4 projection string describing the original spatial reference system in which the geometry is expressed. If using a Proj4 string, the value should be URL-encoded. ​ | 
-|         ​|toProj ​ |string ​ |  |The EPSG/ESRI ID or Proj4 projection string describing the target spatial reference system that you want the geometry reprojected to. If using a Proj4 string, the value should be URL-encoded. ​ | 
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-</​div> ​ 
- 
-<div cloud_client_method>​ projectionClient.projectForPoint(pointY,​ pointX, fromProj, toProj, callback) </​div>​ 
-<div cloud_client_description>​Converts a geometry from one spatial reference system to another.</​div>​ 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
-<code javascript>​ 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  projectionClient.projectForPoint(-55.0000,​31.9000,​4326,​3857,​ callback); 
-</​code>​ 
- 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^    
-|pointY ​ |number ​ |  |The Y coordinate of the point. ​            ​|  ​ 
-|pointX ​ |number ​ |  |The X coordinate of the point. ​            ​|  ​ 
-|fromProj ​ |string ​ |  |The EPSG/ESRI ID or Proj4 projection string describing the original spatial reference system in which the geometry is expressed. If using a Proj4 string, the value should be URL-encoded. ​ |  
-|toProj ​ |string ​ |  |The EPSG/ESRI ID or Proj4 projection string describing the target spatial reference system that you want the geometry reprojected to. If using a Proj4 string, the value should be URL-encoded. ​  ​|  ​ 
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-</​div> ​ 
- 
-<div cloud_client_method>​ projectionClient.projectForGeometry(wkt,​ fromProj, toProj, callback) </​div>​ 
-<div cloud_client_description>​Converts geometry in Well Known Text format from one spatial reference system to another.</​div>​ 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
-<code javascript>​ 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  projectionClient.projectForGeometry('​LINESTRING(-1399103.3657318656 308805.5942721125,​-802283.0488812095 592539.8432666864)',​3857,​ 4326, callback); 
-</​code>​ 
- 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^    
-|wkt  |string ​ |  |The geometry that you want to reproject. ​            ​|  ​ 
-|fromProj ​ |string ​ |  |The EPSG/ESRI ID or Proj4 projection string describing the original spatial reference system in which the geometry is expressed. If using a Proj4 string, the value should be URL-encoded. ​ |  
-|toProj ​ |string ​ |  |The EPSG/ESRI ID or Proj4 projection string describing the target spatial reference system that you want the geometry reprojected to. If using a Proj4 string, the value should be URL-encoded. ​  ​|  ​ 
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-</​div> ​ 
- 
- 
-<div cloud_client_method>​ projectionClient.projectForGeometries(options,​ callback) </​div>​ 
-<div cloud_client_description>​Converts a collection of geometries in Well Known Text format from one spatial reference system to another.</​div>​ 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
-<code javascript>​ 
-   var wktArr=[ 
-      "​POINT(-997961.8412912609 563188.0244051788)",​ 
-      "​POINT(-900122.4450862352 484916.5074411584)",​ 
-      "​POINT(-802283.0488812095 612107.7225076917)"​ 
-   ]; 
-   var options = { 
-      body: { 
-          wkt: wktArr, 
-          fromProj: "​3857",​ 
-          toProj: "​4326"​ 
-      } 
-  }; 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  projectionClient.projectForGeometries(options , callback); 
-</​code>​ 
- 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^    
-|options ​ |Options ​ |  |             ​|  ​ 
-|         ​^Name ​    ​^Type ​ ^Default ​ ^Description ​ ^ 
-|         ​|body ​ |object ​ |  |A request object containing the geometries to be reprojected,​ as well as input and output spatial reference systems. ​ | 
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-</​div> ​ 
- 
- 
-===== tg.ReverseGeocodingClient ===== 
-A class provides the methods to access the ReverseGeocoding APIs. Reverse geocode to find locations near a geometry. 
- 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
- 
-<code javascript>​ 
-  var reverseGeocodingClient = new tg.ReverseGeocodingClient ('​Your-Cloud-Service-Api-Key'​);​ 
-</​code>​ 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name  ^Type  ^Description ​ ^ 
-|apiKey ​ |string ​ | An API key for access to ThinkGeo Cloud services, it can be created following the  [[http://​wiki.thinkgeo.com/​wiki/​thinkgeo_cloud_quick_start_guide|guide]] ​ | 
-</​div> ​ 
- 
- 
-<div cloud_client_synta> ​  ​Return Value </​div> ​ 
-<div cloud_client_description>​a ReverseGeocoding object to access the ReverseGeocoding APIs in ThinkGeo Cloud service.</​div>​ 
- 
- 
- 
-<div cloud_client_method>​ reverseGeocodingClient.search(options,​ callback) </​div>​ 
-<div cloud_client_description>​Searches for locations around a geometry.</​div>​ 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
-<code javascript>​ 
-  var options = { 
-      pointX: -10780076.527743513,​ 
-      pointY: 3864866.351926295,​ 
-      srid: 3857, 
-  }; 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  reverseGeocodingClient.search(options , callback); 
-</​code>​ 
- 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^    
-|options ​ |Options ​ |  |             ​|  ​ 
-|         ​^Name ​    ​^Type ​ ^Default ​ ^Description ​ ^ 
-|         ​|pointX ​ |number |  |The X coordinate of the point. ​ | 
-|         ​|pointY ​ |number |  |The Y coordinate of the point. ​ | 
-|         ​|wkt ​ |string ​ |  |The Well Known Text (WKT) of the geometry to use as the search area.  | 
-|         ​|body ​ |array ​ |  |A list of points to be reverse geocoded. ​ | 
-|         ​|srid ​ |integer ​ |4326  |The SRID (coordinate system) in which to express the result. ​ | 
-|         ​|proj4String ​ |string ​ |  |The Proj4String (coordinate system) in which to express the result. ​   | 
-|         ​|searchRadius ​ |number ​ |200  |The maximun radius around the input point to search for places. Defaults to 200.    | 
-|         ​|searchRadiusUnit ​ |string ​ |"​Meter" ​ |The unit of measure in which the SearchRadius is expressed. Defaults to “Meter”. ​   | 
-|         ​|maxResults ​ |integer ​ |20  |The maximum number of results to return. Defaults to 20.    | 
-|         ​|locationCategories ​ |string ​ |"​Common" ​ |The categories of locations to include in the result set. The default value is "​Common"​. ​   | 
-|         ​|locationTypes ​ |string ​ |  |Filters the resulting locations by type. Multiple types should be separated by a comma. Defaults to no filter. ​   | 
-|         ​|verboseResults ​ |boolean ​ |false ​ |Indicates whether the results should be verbose or not. When false, the results will have fewer properties. Defaults to false. ​   | 
-|         ​|distanceFromQueryFeatureUnit ​ |string ​ |"​Meter" ​ |The unit of measure in which the distance is expressed. Defaults to “Meter”. ​   | 
-|         ​|lang ​ |string ​ |"​en" ​ |Optional. Sets the language for the search result. The default value is “en”. ​   | 
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-</​div> ​ 
- 
- 
- 
-<div cloud_client_method>​ reverseGeocodingClient.searchPlaceByPoint(pointY,​ pointX, callback, options) </​div>​ 
-<div cloud_client_description>​Searches for locations around a geometry.</​div>​ 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
-<code javascript>​ 
-  var options = { 
-      srid: 3857 
-  }; 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  reverseGeocodingClient.searchPlaceByPoint(3864866.351926295,​ -10780076.527743513,​ callback, options); 
-</​code>​ 
- 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^    
-|pointY ​ |number ​  ​| ​ |  |The Y coordinate of the point. ​            | 
-|pointX ​ |number ​  ​| ​ |  |The X coordinate of the point. ​            ​| ​ 
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-|options ​ |Options ​ |  |             ​|  ​ 
-|         ​^Name ​    ​^Type ​ ^Default ​ ^Description ​ ^ 
-|         ​|srid ​ |integer ​ |4326  |The SRID (coordinate system) in which to express the result. ​ | 
-|         ​|proj4String ​ |string ​ |  |The Proj4String (coordinate system) in which to express the result. ​   | 
-|         ​|searchRadius ​ |number ​ |200  |The maximun radius around the input point to search for places. Defaults to 200.    | 
-|         ​|searchRadiusUnit ​ |string ​ |"​Meter" ​ |The unit of measure in which the SearchRadius is expressed. Defaults to “Meter”. ​   | 
-|         ​|maxResults ​ |integer ​ |20  |The maximum number of results to return. Defaults to 20.    | 
-|         ​|locationCategories ​ |string ​ |"​Common" ​ |The categories of locations to include in the result set. The default value is "​Common"​. ​   | 
-|         ​|locationTypes ​ |string ​ |  |Filters the resulting locations by type. Multiple types should be separated by a comma. Defaults to no filter. ​   | 
-|         ​|verboseResults ​ |boolean ​ |false ​ |Indicates whether the results should be verbose or not. When false, the results will have fewer properties. Defaults to false. ​   | 
-|         ​|distanceFromQueryFeatureUnit ​ |string ​ |"​Meter" ​ |The unit of measure in which the distance is expressed. Defaults to “Meter”. ​   | 
-|         ​|lang ​ |string ​ |"​en" ​ |Optional. Sets the language for the search result. The default value is “en”. ​   | 
-</​div> ​ 
- 
- 
-<div cloud_client_method>​ reverseGeocodingClient.searchPlaceByLine(wkt,​ callback, options) </​div>​ 
-<div cloud_client_description>​Searches for locations around a line.</​div>​ 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
-<code javascript>​ 
-  var options = { 
-      srid: 3857, 
-  }; 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  reverseGeocodingClient.searchPlaceByLine("​LINESTRING(-10780840.898026364 3864952.343583116,​-10780219.847171547 3865009.67135433)",​ callback, options); 
-</​code>​ 
- 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^  
-|wkt   ​|string ​  ​| ​ |  | The Well Known Text (WKT) of the geometry to use as the search area.            |  
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-|options ​ |Options ​ |  |             ​|  ​ 
-|         ​^Name ​    ​^Type ​ ^Default ​ ^Description ​ ^ 
-|         ​|srid ​ |integer ​ |4326  |The SRID (coordinate system) in which to express the result. ​ | 
-|         ​|proj4String ​ |string ​ |  |The Proj4String (coordinate system) in which to express the result. ​   | 
-|         ​|searchRadius ​ |number ​ |200  |The maximun radius around the input point to search for places. Defaults to 200.    | 
-|         ​|searchRadiusUnit ​ |string ​ |"​Meter" ​ |The unit of measure in which the SearchRadius is expressed. Defaults to “Meter”. ​   | 
-|         ​|maxResults ​ |integer ​ |20  |The maximum number of results to return. Defaults to 20.    | 
-|         ​|locationCategories ​ |string ​ |"​Common" ​ |The categories of locations to include in the result set. The default value is "​Common"​. ​   | 
-|         ​|locationTypes ​ |string ​ |  |Filters the resulting locations by type. Multiple types should be separated by a comma. Defaults to no filter. ​   | 
-|         ​|verboseResults ​ |boolean ​ |false ​ |Indicates whether the results should be verbose or not. When false, the results will have fewer properties. Defaults to false. ​   | 
-|         ​|distanceFromQueryFeatureUnit ​ |string ​ |"​Meter" ​ |The unit of measure in which the distance is expressed. Defaults to “Meter”. ​   | 
-|         ​|lang ​ |string ​ |"​en" ​ |Optional. Sets the language for the search result. The default value is “en”. ​   | 
-</​div> ​ 
- 
- 
-<div cloud_client_method>​ reverseGeocodingClient.searchPlaceByArea(wkt,​ callback, options) </​div>​ 
-<div cloud_client_description>​Searches for locations around a geometry.</​div>​ 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
-<code javascript>​ 
-  var wkt= "​POLYGON((-10780611.586941509 3864847.242669224,​-10780831.343397828 3864617.9315843685,​-10780363.166599581 3864637.0408414397,​-10780611.586941509 3864847.242669224))"​ 
-  var options = { 
-      srid: 3857, 
-  }; 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  reverseGeocodingClient.searchPlaceByArea(wkt,​ callback, options); 
-</​code>​ 
- 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^  
-|wkt   ​|string ​  ​| ​ |  | The Well Known Text (WKT) of the geometry to use as the search area.            |  
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-|options ​ |Options ​ |  |             ​|  ​ 
-|         ​^Name ​    ​^Type ​ ^Default ​ ^Description ​ ^ 
-|         ​|srid ​ |integer ​ |4326  |The SRID (coordinate system) in which to express the result. ​ | 
-|         ​|proj4String ​ |string ​ |  |The Proj4String (coordinate system) in which to express the result. ​   | 
-|         ​|searchRadius ​ |number ​ |200  |The maximun radius around the input point to search for places. Defaults to 200.    | 
-|         ​|searchRadiusUnit ​ |string ​ |"​Meter" ​ |The unit of measure in which the SearchRadius is expressed. Defaults to “Meter”. ​   | 
-|         ​|maxResults ​ |integer ​ |20  |The maximum number of results to return. Defaults to 20.    | 
-|         ​|locationCategories ​ |string ​ |"​Common" ​ |The categories of locations to include in the result set. The default value is "​Common"​. ​   | 
-|         ​|locationTypes ​ |string ​ |  |Filters the resulting locations by type. Multiple types should be separated by a comma. Defaults to no filter. ​   | 
-|         ​|verboseResults ​ |boolean ​ |false ​ |Indicates whether the results should be verbose or not. When false, the results will have fewer properties. Defaults to false. ​   | 
-|         ​|distanceFromQueryFeatureUnit ​ |string ​ |"​Meter" ​ |The unit of measure in which the distance is expressed. Defaults to “Meter”. ​   | 
-|         ​|lang ​ |string ​ |"​en" ​ |Optional. Sets the language for the search result. The default value is “en”. ​   | 
-</​div> ​ 
- 
-<div cloud_client_method>​ reverseGeocodingClient.searchPlaceByPoints(options,​ callback) </​div>​ 
-<div cloud_client_description>​Searches for locations around multi points.</​div>​ 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
-<code javascript>​ 
- 
-  var options = { 
-      body:[ 
-          { 
-             ​coord:​ "​32.8345,​-96.8616",​ 
-             srid: 4326 
-          }, 
-          { 
-             ​coord:​ "​34.8345,​-93.8616",​ 
-             srid: 4326 
-          } 
-      ] 
-  }; 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  reverseGeocodingClient.searchPlaceByPoints(options , callback); 
-</​code>​ 
- 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^  
-|options ​ |Options ​ |  |             ​|  ​ 
-|         ​^Name ​    ​^Type ​ ^Default ​ ^Description ​ ^ 
-|         ​|body ​ |array ​ |  |A list of points to be reverse geocoded. ​ | 
-|         ​|srid ​ |integer ​ |4326  |The SRID (coordinate system) in which to express the result. ​ | 
-|         ​|proj4String ​ |string ​ |  |The Proj4String (coordinate system) in which to express the result. ​   | 
-|         ​|searchRadius ​ |number ​ |200  |The maximun radius around the input point to search for places. Defaults to 200.    | 
-|         ​|searchRadiusUnit ​ |string ​ |"​Meter" ​ |The unit of measure in which the SearchRadius is expressed. Defaults to “Meter”. ​   | 
-|         ​|maxResults ​ |integer ​ |20  |The maximum number of results to return. Defaults to 20.    | 
-|         ​|locationCategories ​ |string ​ |"​Common" ​ |The categories of locations to include in the result set. The default value is "​Common"​. ​   | 
-|         ​|locationTypes ​ |string ​ |  |Filters the resulting locations by type. Multiple types should be separated by a comma. Defaults to no filter. ​   | 
-|         ​|verboseResults ​ |boolean ​ |false ​ |Indicates whether the results should be verbose or not. When false, the results will have fewer properties. Defaults to false. ​   | 
-|         ​|distanceFromQueryFeatureUnit ​ |string ​ |"​Meter" ​ |The unit of measure in which the distance is expressed. Defaults to “Meter”. ​   | 
-|         ​|lang ​ |string ​ |"​en" ​ |Optional. Sets the language for the search result. The default value is “en”. ​   | 
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-</​div> ​ 
- 
- 
- 
-<div cloud_client_method>​ reverseGeocodingClient.searchPlaceById(placeId,​ callback, options) </​div>​ 
-<div cloud_client_description>​Get details about a place by its OpenStreetMap ID.</​div>​ 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
-<code javascript>​ 
-  var options={ 
-      lang:"​en"​ 
-  } 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  reverseGeocodingClient.searchPlaceById(8689729,​ callback, options); 
-</​code>​ 
- 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^  
-|placeId ​ |integer ​ |  |  |The OpenStreetMap ID of the place            |  
-|options ​ |Options ​ |  |             ​|  ​ 
-|         ​^Name ​    ​^Type ​ ^Default ​ ^Description ​ ^ 
-|         ​|lang ​ |string ​ |"​en" ​ |Optional. Sets the language for the search result. The default value is “en”. ​   | 
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-</​div> ​ 
- 
- 
-<div cloud_client_method>​ reverseGeocodingClient.getPlaceCatergories(callback) </​div>​ 
-<div cloud_client_description>​Get the available location categories.</​div>​ 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
-<code javascript>​ 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  reverseGeocodingClient.getPlaceCatergories(callback);​ 
-</​code>​ 
- 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^  
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-</​div> ​ 
- 
- 
-<div cloud_client_method>​ reverseGeocodingClient.getCommonCatergories(callback) </​div>​ 
-<div cloud_client_description>​Get the types of locations that are considered common.</​div>​ 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
-<code javascript>​ 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  reverseGeocodingClient.getCommonCatergories(callback);​ 
-</​code>​ 
- 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^  
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-</​div> ​ 
- 
- 
- 
-===== tg.GeocodingClient ===== 
-A class provides the methods to access the GeocodingClient APIs. Geocode to get the coordinates of an address. 
- 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
- 
-<code javascript>​ 
-var geocodingClient = new tg.GeocodingClient ('​Your-Cloud-Service-Api-Key'​);​ 
-</​code>​ 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name  ^Type  ^Description ​ ^ 
-|apiKey ​ |string ​ | An API key for access to ThinkGeo Cloud services, it can be created following the  [[http://​wiki.thinkgeo.com/​wiki/​thinkgeo_cloud_quick_start_guide|guide]] ​ | 
-</​div> ​ 
- 
-<div cloud_client_synta> ​  ​Return Value </​div> ​ 
-<div cloud_client_description>​a Geocoding object to access the Geocoding APIs in ThinkGeo Cloud service.</​div>​ 
- 
- 
- 
- 
-<div cloud_client_method>​ geocodingClient.search(options,​ callback) </​div>​ 
-<div cloud_client_description>​Search for a location expression.</​div>​ 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
-<code javascript>​ 
-  var options = { 
-       ​location:​ "​Dallas",​ 
-       ​maxResults:​ 5, 
-  }; 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  geocodingClient.search(options,​ callback); 
-</​code>​ 
- 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^    
-|options ​ |Options ​ |  |             ​|  ​ 
-|         ​^Name ​    ​^Type ​ ^Default ​ ^Description ​ ^ 
-|         ​|location ​ |array |  |The location expression. ​ | 
-|         ​|body ​ |string ​ |  |A list of addresses to be geocoded. ​ | 
-|         ​|locationType ​ |string ​ |  |Specifies what types of locations will be considered a match. Possible values are Address, Street, State, City, County, Zipcode, Country. ​ | 
-|         ​|fuzzyMatch ​ |boolean ​ |false ​ |Specifies whether to attempt approximate,​ as well as exact, matching when performing geocodes. Defaults to false. ​ | 
-|         ​|maxResults ​ |integer ​ |10   |The maximum number of possible matches to return, if multiple candidates are found. Defaults to 10.  | 
-|         ​|verboseResults ​ |boolean ​ |false ​ |Indicates whether the results should be verbose or not. When false, the results will have fewer properties. Defaults to false. ​ | 
-|         ​|srid ​ |integer ​ |  |The SRID (coordinate system ID) in which to express the result. Mutually exclusive from the Proj4String parameter. ​ | 
-|         ​|proj4String ​ |string ​ |"​+proj=longlat +datum=WGS84 +no_defs" ​ |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”. ​ | 
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-</​div> ​ 
- 
- 
-<div cloud_client_method>​ geocodingClient.searchByPoint(location,​ callback, options) </​div>​ 
-<div cloud_client_description>​Search for a location expression.</​div>​ 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
-<code javascript>​ 
-  var options = { 
-       ​maxResults:​ 5, 
-  }; 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  geocodingClient.searchByPoint("​Dallas",​ callback, options); 
-</​code>​ 
- 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^    
-|location ​ |string ​ |  |  |The location expression. ​   |  ​ 
-|options ​ |Options ​ |  |             ​|  ​ 
-|         ​^Name ​    ​^Type ​ ^Default ​ ^Description ​ ^ 
-|         ​|locationType ​ |string ​ |  |Specifies what types of locations will be considered a match. Possible values are Address, Street, State, City, County, Zipcode, Country. ​ | 
-|         ​|fuzzyMatch ​ |boolean ​ |false ​ |Specifies whether to attempt approximate,​ as well as exact, matching when performing geocodes. Defaults to false. ​ | 
-|         ​|maxResults ​ |integer ​ |10   |The maximum number of possible matches to return, if multiple candidates are found. Defaults to 10.  | 
-|         ​|verboseResults ​ |boolean ​ |false ​ |Indicates whether the results should be verbose or not. When false, the results will have fewer properties. Defaults to false. ​ | 
-|         ​|srid ​ |integer ​ |  |The SRID (coordinate system ID) in which to express the result. Mutually exclusive from the Proj4String parameter. ​ | 
-|         ​|proj4String ​ |string ​ |"​+proj=longlat +datum=WGS84 +no_defs" ​ |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”. ​ | 
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-</​div> ​ 
- 
- 
-<div cloud_client_method>​ geocodingClient.searchBatch(options,​ callback) </​div>​ 
-<div cloud_client_description>​Search for a location expression</​div>​ 
-<div cloud_client_synta> ​ Syntax </​div> ​ 
-<code javascript>​ 
-  var options = { 
-       ​body:​[ 
-           { 
-              searchText:"​Dallas",​ 
-              maxResults:​5 
-           }, 
-           { 
-              searchText:"​Frisco"​ 
-           } 
-       ] 
-       ​maxResults:​ 6, 
-  }; 
-  var callback = function (status, response) { 
-      console.log(response);​ 
-  }; 
-  geocodingClient.searchBatch(options,​ callback); 
-</​code>​ 
- 
-<div cloud_client_parameter> ​  ​Parameters ​  </​div> ​ 
-<div cloud_client_table>​ 
-^Name     ​^Type ​    ​^ ​  ​^ ​  ​^Description ^    
-|options ​ |Options ​ |  |             ​|  ​ 
-|         ​^Name ​    ​^Type ​ ^Default ​ ^Description ​ ^ 
-|         ​|body ​ |string ​ |  |A list of addresses to be geocoded. ​ | 
-|         ​|locationType ​ |string ​ |  |Specifies what types of locations will be considered a match. Possible values are Address, Street, State, City, County, Zipcode, Country. ​ | 
-|         ​|fuzzyMatch ​ |boolean ​ |false ​ |Specifies whether to attempt approximate,​ as well as exact, matching when performing geocodes. Defaults to false. ​ | 
-|         ​|maxResults ​ |integer ​ |10   |The maximum number of possible matches to return, if multiple candidates are found. Defaults to 10.  | 
-|         ​|verboseResults ​ |boolean ​ |false ​ |Indicates whether the results should be verbose or not. When false, the results will have fewer properties. Defaults to false. ​ | 
-|         ​|srid ​ |integer ​ |  |The SRID (coordinate system ID) in which to express the result. Mutually exclusive from the Proj4String parameter. ​ | 
-|         ​|proj4String ​ |string ​ |"​+proj=longlat +datum=WGS84 +no_defs" ​ |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”. ​ | 
-|callback ​ |function ​ |  |  |the callback for response ​ | 
-</​div> ​ 
- 
-===== tg.BaseClient===== 
-A class provides the basic methods to send request to ThinkGeo Cloud services. Subclasses: ​ ColorClient,​ Elevation, GeocodingClient,​ MapsClient, ProjectionClient,​ ReverseGeocodingClient. 
- 
- 
-=== on === 
-  * sendingrequest 
-  * sentrequest 
- 
-<code javascript>​ 
-// For example elevationClient 
-elevationClient.on("​sendingrequest",​ function (e){ 
-    console.log(e);​ 
-}); 
-elevationClient.on("​sentrequest",​ function (e){ 
-    console.log(e);​ 
-}) 
- 
- 
-</​code>​ 
- 
- 
- 
- 
- 
- 
- 
  
thinkgeo_cloud_javascript_sdk_api.1548149997.txt.gz · Last modified: 2019/01/22 09:39 by johnnyz