L.esri.Geocoding.Geocode
Extends L.esri.Task
L.esri.Geocoding.Geocode
is an abstraction for submitting geocoding requests. You can find more information and the source code for this plugin here.
Constructor
Constructor | Description |
---|---|
L.esri.Geocoding.geocode(<Object>options) | Creates a new `Geocode` task |
You can pass any options you can pass to L.esri.Task. The url
will be the ArcGIS geocoding service by default but a custom geocoding service can also be used.
Methods
Method | Returns | Description |
---|---|---|
text(<String>text) | this | The text to geocode. If you specify `text` other params like `address`, `city`, `subregion`, `region`, `postal`, and `country` will be ignored. |
address(<String>text) | this | The street and house number to be geocoded. |
neighborhood(<String>text) | this | The neighborhood to be geocoded. |
city(<String>text) | this | The city to be geocoded. |
subregion(<String>text) | this | The subregion to be geocoded. |
region(<String>text) | this | The region to be geocoded. |
postal(<String>text) | this | The postal code to be geocoded. |
country(<String>text) | this | The country to be geocoded. |
category(<String>category) | this | The optional category to search for. A list of valid categories can be found here. |
within(<L.LatLngBounds>bounds) | this | A bounding box used to filter results. |
nearby(<L.LatLng>latlng, <Integer>distance) | this | Increase the match score of candidates close to a location passed within the request. |
run(<Function>callback, <Object>context) | XMLHttpRequest | Executes the request chain and accepts the response callback. |
Examples
Results Object
In the samples above the results
object will look like this.