Constructor
(abstract) new Geocoder(context, options)
Parameters:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
context |
bemap.Context | BeMap-JS-API Context. Mandatory. | ||||||||||||
options |
object | see below the available values.
Properties
|
- Source:
Members
(protected) bbox :bemap.BoundingBox
Type:
- Source:
(protected) language :String
Type:
- String
- Source:
(protected) maxResult :int
Type:
- int
- Source:
Methods
cleanMarkers() → {bemap.markerMapObject}
Reset the geocoding marker object. Clear the previous result.
- Source:
Returns:
this
- Type
- bemap.markerMapObject
createTable(response, options, container, listener)
Create table in selected div with data from parsing. Event click send by listener
Parameters:
| Name | Type | Description |
|---|---|---|
response |
Object | data for create table. |
options |
object | see below the available values. |
container |
DIV | element to create table inside. |
listener |
function | the function to call to get click data |
- Source:
geocode(request, optionsopt) → {Promise.<bemap.GeocodingResponse>|bemap.Geocoder}
Geocode a structured or free-text request.
Parameters:
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
request |
bemap.GeocodingRequest | Object | When a `GeocodingRequest` is passed the call returns a Promise. Any other shape falls through to the legacy callback-style implementation. | |||||||||
options |
Object |
<optional> |
Properties
|
Returns:
- Type
- Promise.<bemap.GeocodingResponse> | bemap.Geocoder
geocode(options) → {bemap.Geocoder}
Send a geocoding request to the bemap's server.
Parameters:
| Name | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | See below the available values.
Properties
|
- Source:
Returns:
this.
- Type
- bemap.Geocoder
getBoundingBox() → {bemap.BoundingBox}
Get the bounding box of the research.
- Source:
Returns:
bbox
- Type
- bemap.BoundingBox
getLanguage() → {String}
Get the language.
- Source:
Returns:
language
- Type
- String
getMaxResult() → {Int}
Get the number of max results.
- Source:
Returns:
maxResult
- Type
- Int
reverseGeocode(coordinate, radiusopt, optionsopt) → {Promise.<bemap.GeocodingResponse>}
Convenience alias for the typed reverse-geocoding path.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
coordinate |
bemap.Coordinate | bemap.CoordinateSat | |||
radius |
Number |
<optional> |
50 | |
options |
Object |
<optional> |
Extra fields forwarded to ReverseGeocodingRequest. |
Returns:
- Type
- Promise.<bemap.GeocodingResponse>
revGeocode(request, optionsopt) → {Promise.<bemap.GeocodingResponse>|bemap.Geocoder}
Reverse-geocode through the same channel `bemap.ReverseGeocoder` uses
(`POST service/geocoding/1.0/reverse`). Accepts either a
`ReverseGeocodingRequest` (typed v1.5 path) or the legacy
`{searchInfo: RevGeoSearchInfo, success, failed}` shape.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
request |
bemap.ReverseGeocodingRequest | Object | ||
options |
Object |
<optional> |
Returns:
- Type
- Promise.<bemap.GeocodingResponse> | bemap.Geocoder
revGeocode(options) → {bemap.Geocoder}
Execute the geocoding research.
Parameters:
| Name | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | See below the available values.
Properties
|
- Source:
Returns:
this.
- Type
- bemap.Geocoder
setBoundingBox(bbox) → {bemap.Geocoder}
Set the bounding box of the research.
Parameters:
| Name | Type | Description |
|---|---|---|
bbox |
bemap.BoundingBox | the new bounding box to set. |
- Source:
Returns:
this.
- Type
- bemap.Geocoder
setLanguage(language) → {bemap.Geocoder}
Set the language of the research.
Parameters:
| Name | Type | Description |
|---|---|---|
language |
String | the new language to set. |
- Source:
Returns:
this.
- Type
- bemap.Geocoder
setMaxResult(maxResult) → {bemap.Geocoder}
Set the number of max results.
Parameters:
| Name | Type | Description |
|---|---|---|
maxResult |
Int | the new number of max results. |
- Source:
Returns:
this.
- Type
- bemap.Geocoder
showOnMap(map, response, options, listener)
Parse data to create marker or markers on map
Parameters:
| Name | Type | Description |
|---|---|---|
map |
bemap.Map | for creating new marker. |
response |
Object | data to parse in. |
options |
object | see below the available values. |
listener |
function | the function to call to get click data |
- Source: