Class: LocationMgr maps.nyc.gov

nyc.LocationMgr

new LocationMgr(options)

A class for managing user-specified location information
Parameters:
Name Type Description
options nyc.LocationMgr.Options Constructor options
Source:
Fires:

Extends

Methods

off(eventName, evtHdlr, hdlrScopeopt)

Remove a previously connected event handler
Parameters:
Name Type Attributes 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:
Source:

on(eventName, evtHdlr, hdlrScopeopt)

Connect a function to an event
Parameters:
Name Type Attributes 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:
Source:

one(eventName, evtHdlr, hdlrScopeopt)

Connect a function to an event for a single invocation
Parameters:
Name Type Attributes 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:
Source:

trigger(eventName, dataopt)

Trigger a named event with event data
Parameters:
Name Type Attributes Description
eventName string The name of the event to trigger
data Object <optional>
The event data
Inherited From:
Source:

Type Definitions

Options

Object type to hold constructor options for nyc.LocationMgr
Type:
  • Object
Properties:
Name Type Attributes Default Description
controls nyc.ZoomSearch The UX controls for user input
locate nyc.Locate The geocoding and geolocation provider
locator nyc.Locator The locator used to manipulate a map
autoLocate boolean <optional>
false Automatically locate using device geolocation on load
Source: