new Geoclient(options)
Create an instance of Geoclient
Parameters:
Name | Type | Description |
---|---|---|
options |
module:nyc/Geoclient~Geoclient.Options | Constructor options |
Fires:
Extends
Members
-
projection :string
-
The epsg code
Type:
- string
- Source:
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(input)
-
Geocode an input string representing a location
Parameters:
Name Type Description input
string The value to geocode
- Inherited From:
- Overrides:
- Source:
-
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/Geoclient~Geoclient
Type:
- Object
- Source:
Properties:
Name Type Argument Default Description url
string The URL for accessing the Geoclient API (see https://developer.cityofnewyork.us/api/geoclient-api)
projection
string <optional>
EPSG:3857 The EPSG code of the projection for output geometries (i.e. EPSG:2263)