new LocationMgr(options)
A class for managing user-specified location information
Parameters:
| Name | Type | Description |
|---|---|---|
options |
module:nyc/ol/LocationMgr~LocationMgr.Options | Constructor options |
- Source:
Fires:
Extends
Members
-
geolocate :module:nyc/Geolocate~Geolocate
-
The Geolocate
Type:
- Inherited From:
- Overrides:
- Source:
-
locator :module:nyc/Locator~Locator
-
The Locator
Type:
- Inherited From:
- Overrides:
- Source:
-
search :module:nyc/Search~Search
-
The Search
Type:
- Inherited From:
- Overrides:
- Source:
-
zoom :module:nyc/Zoom~Zoom
-
The Zoom
Type:
- Inherited From:
- Overrides:
- Source:
Methods
-
goTo(location)
-
Navigate the map to a given location
Parameters:
Name Type Description locationstring A location
- Inherited From:
- Overrides:
- Source:
-
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:
-
setLocation(data)
-
Zoom and center on the provided location
Parameters:
Name Type Description datamodule:nyc/Locator~Locator.Result The location
- Inherited From:
- Overrides:
- Source:
-
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/ol/LocationMgr~LocationMgr
Type:
- Object
- Source:
Properties:
Name Type Argument Default Description mapol.Map The map
urlstring <optional>
The geoclient URL if geocoder is not provided
geocodermodule:nyc/Geocoder~Geocoder <optional>
The geocoder if geoclient URL is not provided
searchTargetjQuery | Element | string The DOM target for the search box
dialogTargetjQuery | Element | string <optional>
body The DOM target in which to display error dialog
placeholderstring <optional>
The placeholder text to display on the input element