new Directions( [options])
Provides directions using google maps
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
options |
module:nyc/Directions~Directions.Options |
<optional> |
Constructor options |
- Source:
Extends
- module:nyc/Contanier~Contanier
Members
-
<static, constant> DEFAULT_GOOGLE_URL :string
-
The default URL for loading Google APIs
Type:
- string
- Source:
-
<static> DEFAULT_STYLES :Array.<Object.<string, Object>>
-
Default styles used for Google Maps API
Type:
- Array.<Object.<string, Object>>
- Source:
-
map :google.maps.Map
-
Type:
- google.maps.Map
- Source:
Methods
-
directions(args)
-
Get directions
Parameters:
Name Type Description args
module:nyc/Directions~Directions.Request The arguments describing the requested directions
- Source:
Returns:
JQuery XHR object
- Type
- jqXHR | undefined
-
init()
-
Initializes the class on callback from the Google Maps
- Source:
Type Definitions
-
Options
-
Constructor options for module:nyc/Directions~Directions
Type:
- Object
- Source:
Properties:
Name Type Argument Default Description url
string <optional>
module:nyc/Directions~Directions.DEFAULT_GOOGLE_URL The Google Maps URL to use
styles
Array.<Object.<strng, Object>> <optional>
The Google Maps styles to use (see https://developers.google.com/maps/documentation/javascript/style-reference)
toggle
jQuery | string Elements to hide from screen readers when directions are shown
-
Request
-
Object type for getting directions
Type:
- Object
- Source:
Properties:
Name Type Argument Description from
string <optional>
The origin location
to
string The destination location
mode
google.maps.DirectionsTravelMode The directions mode
facility
string The name of the destination
returnFocus
JQuery | Element | string The DOM element that should receive focus when leaving the directions view
-
Response
-
Object type for getting directions
Type:
- Object
- Source:
Properties:
Name Type Description response
Object The Google response
status
google.maps.DirectionsStatus The status of the response