Class: LocationMgr

nyc/LocationMgr~ LocationMgr


new LocationMgr(options)

Create an instance of LocationMgr

Parameters:
Name Type Description
options module:nyc/LocationMgr~LocationMgr.Options

Constructor options

Source:
Fires:

Extends

Members


geolocate :module:nyc/Geolocate~Geolocate

The Geolocate

Type:
Source:

locator :module:nyc/Locator~Locator

The Locator

Type:
Source:

The Search

Type:
Source:

zoom :module:nyc/Zoom~Zoom

The Zoom

Type:
Source:

Methods


goTo(location)

Navigate the map to a given location

Parameters:
Name Type Description
location string

A location

Source:

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:

setLocation(data)

Zoom and center on the provided location

Parameters:
Name Type Description
data module:nyc/Locator~Locator.Result

The location

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/LocationMgr~LocationMgr

Type:
  • Object
Properties:
Name Type Argument Default Description
zoom module:nyc/Zoom~Zoom

The UX zoom control for user input

geolocate module:nyc/Geolocate~Geolocate

The UX geolocate control for user input

search module:nyc/Search~Search

The UX search control for user input

locator module:nyc/Locator~Locator

The geocoding and geolocation provider

mapLocator module:nyc/MapLocator~MapLocator

The mapLocator used to manipulate a map

autoLocate boolean <optional>
false

Automatically locator using device geolocation on load

dialogTarget jQuery | Element | string <optional>
body

The DOM target in which to display error dialog

Source: