API.md
February 11, 2018 · View on GitHub
Classes
GeoCode
Kind: global class
- GeoCode
- new GeoCode(options)
- .geolookup() ⇒
Promise - .reverse(lat,, lng,) ⇒
Promise
new GeoCode(options)
| Param | Type | Description |
|---|---|---|
| provider. | string | default 'osm'. 'osm', 'google', 'bing', 'opencage' |
| options | object | for each provider. api key as in 'key' is required for 'google', 'bing' and 'opencage' |
geoCode.geolookup() ⇒ Promise
Kind: instance method of GeoCode
Returns: Promise - with an array format when successful
| Param | Type | Description |
|---|---|---|
| address. | string | e.g. 'brampton, on' |
geoCode.reverse(lat,, lng,) ⇒ Promise
Kind: instance method of GeoCode
Returns: Promise - with an object format when successful
| Param | Type | Description |
|---|---|---|
| lat, | number | latitude |
| lng, | number | latitude |
Bing
Kind: global class
- Bing
- new Bing(options)
- .geolookup() ⇒
Promise - .reverse(lat,, lng,) ⇒
Promise
new Bing(options)
| Param | Type | Description |
|---|---|---|
| options | object | options for Bing geo lookup. e.g. {key: XXXXX, includeNeighbourhood: 1, maxResult: 50} |
bing.geolookup() ⇒ Promise
Kind: instance method of Bing
Returns: Promise - with an array format when successful
| Param | Type | Description |
|---|---|---|
| address. | string | e.g. 'brampton, on' |
bing.reverse(lat,, lng,) ⇒ Promise
Kind: instance method of Bing
Returns: Promise - with an object format when successful
| Param | Type | Description |
|---|---|---|
| lat, | number | latitude |
| lng, | number | longitude |
Kind: global class
- Google
- new Google(options)
- .geolookup() ⇒
Promise - .reverse(lat,, lng,) ⇒
Promise
new Google(options)
| Param | Type | Description |
|---|---|---|
| options | object | options for Google geo lookup. e.g. {key: XXXXX, language: 'en-US'} |
google.geolookup() ⇒ Promise
Kind: instance method of Google
Returns: Promise - with an array format when successful
| Param | Type | Description |
|---|---|---|
| address. | string | e.g. 'brampton, on' |
google.reverse(lat,, lng,) ⇒ Promise
Kind: instance method of Google
Returns: Promise - with an object format when successful
| Param | Type | Description |
|---|---|---|
| lat, | number | latitude |
| lng, | number | longitude |
OpenStreet
Kind: global class
- OpenStreet
- new OpenStreet(options)
- .geolookup() ⇒
Promise - .reverse(lat,, lng,) ⇒
Promise
new OpenStreet(options)
| Param | Type | Description |
|---|---|---|
| options | object | options for OpenStreet geo lookup. e.g. {key: XXXXX, limit: 15, zoom: 18, addressdetail: 1, lang: 'en-US'} |
openStreet.geolookup() ⇒ Promise
Kind: instance method of OpenStreet
Returns: Promise - with an array format when successful
| Param | Type | Description |
|---|---|---|
| address. | string | e.g. 'brampton, on' |
openStreet.reverse(lat,, lng,) ⇒ Promise
Kind: instance method of OpenStreet
Returns: Promise - with an object format when successful
| Param | Type | Description |
|---|---|---|
| lat, | number | latitude |
| lng, | number | latitude |
OpenCage
Kind: global class
- OpenCage
- new OpenCage(options)
- .geolookup() ⇒
Promise - .reverse(lat,, lng,) ⇒
Promise
new OpenCage(options)
| Param | Type | Description |
|---|---|---|
| options | object | options for OpenCage geo lookup. e.g. {key: XXXXX, lang: 'en-US'} |
openStreet.geolookup() ⇒ Promise
Kind: instance method of OpenCage
Returns: Promise - with an array format when successful
| Param | Type | Description |
|---|---|---|
| address. | string | e.g. 'brampton, on' |
openStreet.reverse(lat, lng) ⇒ Promise
Kind: instance method of OpenCage
Returns: Promise - with an object format when successful
| Param | Type | Description |
|---|---|---|
| lat, | number | latitude |
| lng, | number | latitude |