Class: OsmGeocoder

nyc/OsmGeocoder~ OsmGeocoder

Extends

Methods


off(eventName, evtHdlr [, hdlrScope])

Remove a previously connected event handler

Parameters:
Name Type Argument Description
eventName string

The name of the event to which the handler will be connected

evtHdlr function

The event handler function

hdlrScope Object <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
eventName string

The name of the event to which the handler will be connected

evtHdlr function

The event handler function

hdlrScope Object <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
eventName string

The name of the event to which the handler will be connected

evtHdlr function

The event handler function

hdlrScope Object <optional>

The scope in which to invoke the event handler

Inherited From:
Overrides:
Source:

Search for a location

Parameters:
Name Type Description
input string

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
eventName string

The name of the event to trigger

data Object <optional>

The event data

Inherited From:
Overrides:
Source:

Type Definitions


Options

Constructor options for module:nyc/OsmGeocoder~OsmGeocoder

Type:
  • Object
Properties:
Name Type Argument Default Description
countryCodes Array.<string> <optional>
['us']

The countries in which your events are located

viewBox Array.<number> <optional>
['us']

A bounding box for the geocoder in EPSG:4326

projection string <optional>
EPSG:3857

The EPSG code of the projection for output coordinates

Source: