@@ -74,18 +74,19 @@ Queries the geocoder with a query string, and returns its result, if any.
| Options | Value | Description |
| ---- | ---- | ---- |
| queryString (_required_) | string | a query, expressed as a string, like 'Arkansas' |
| options | object | an object containing the query and options parameters like `{ query: 'ونک', limit: 5 }`. <br><br>Other available parameteres: <br><br><ul><li>`limit`*integer* - Max is 30</li><li>`distance`*float* - Unit is km, 0.1 means 100 meters</li><li>`location`*lat,lon* - For searching near a location. should be accompanied with distance param</li><li>`type`*enum* - Possible values: `locality`, `roundabout`, `street`, `freeway`, `expressway`, `boulevard`<br>(You can mix types by separating them with comma)</li><li>`ne`*lat,lon* - Specifies north east of the bounding box - should be accompanied with `sw` param</li><li>`sw` lat,lon - Specifies south west of the bounding box - should be accompanied with `ne` param</li></ul> |
| options | object | an object containing the query and options parameters like `{ query: 'ونک', limit: 5 }`. <br/><br/>Other available parameteres: <br/><br/><ul><li>`limit`*integer* - Max is 30</li><li>`distance`*float* - Unit is km, 0.1 means 100 meters</li><li>`location`*lat,lon* - For searching near a location. should be accompanied with distance param</li><li>`type`*enum* - Possible values: `locality`, `roundabout`, `street`, `freeway`, `expressway`, `boulevard`<br/>(You can mix types by separating them with comma)</li><li>`ne`*lat,lon* - Specifies north east of the bounding box - should be accompanied with `sw` param</li><li>`sw` lat,lon - Specifies south west of the bounding box - should be accompanied with `ne` param</li></ul> |
| callback (_required_) | function | a callback |
The callback is called with arguments
1. An error, if any
2. The result. This is an object with the following members:
{
status: // OK
results: // raw results
}
```javascript
{
status:// OK
results:// raw results
}
```
_Example_: [Live example of geocoder.query centering a map.](http://www.cedarmaps.com/websdk/demos/geocoder-control.html)
...
...
@@ -93,21 +94,21 @@ _Returns_: the geocoder object. The return value of this function is not useful
#### Geocoding Examples:
using a single query parameter:
```
```javascript
geocoder.query('ونک',function(){});
```
using query string along with an option (Limiting the results):