new OsmGeocoder(options)
A class for geocoding utilizing the OSM Nominatim API (Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright)
Parameters:
| Name | Type | Description |
|---|---|---|
options |
module:nyc/OsmGeocoder~OsmGeocoder.Options | Constructor options |
Fires:
Extends
Methods
-
off(eventName, evtHdlr [, hdlrScope])
-
Remove a previously connected event handler
Parameters:
Name Type Argument Description eventNamestring The name of the event to which the handler will be connected
evtHdlrfunction The event handler function
hdlrScopeObject <optional>
The scope in which to invoke the event handler
- Inherited From:
- Overrides:
- Source:
-
on(eventName, evtHdlr [, hdlrScope])
-
Connect a function to an event
Parameters:
Name Type Argument Description eventNamestring The name of the event to which the handler will be connected
evtHdlrfunction The event handler function
hdlrScopeObject <optional>
The scope in which to invoke the event handler
- Inherited From:
- Overrides:
- Source:
-
one(eventName, evtHdlr [, hdlrScope])
-
Connect a function to an event for a single invocation
Parameters:
Name Type Argument Description eventNamestring The name of the event to which the handler will be connected
evtHdlrfunction The event handler function
hdlrScopeObject <optional>
The scope in which to invoke the event handler
- Inherited From:
- Overrides:
- Source:
-
search(input)
-
Search for a location
Parameters:
Name Type Description inputstring Input
- Overrides:
- Source:
Returns:
The result of the search request
- Type
- Promise.<Object>
-
trigger(eventName [, data])
-
Trigger a named event with event data
Parameters:
Name Type Argument Description eventNamestring The name of the event to trigger
dataObject <optional>
The event data
- Inherited From:
- Overrides:
- Source:
Type Definitions
-
Options
-
Constructor options for module:nyc/OsmGeocoder~OsmGeocoder
Type:
- Object
- Source:
Properties:
Name Type Argument Default Description countryCodesArray.<string> <optional>
['us'] The countries in which your events are located
viewBoxArray.<number> <optional>
A restricting bounding box for the geocoder in EPSG:4326
projectionstring <optional>
EPSG:3857 The EPSG code of the projection for output coordinates