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 argsmodule: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 urlstring <optional>
module:nyc/Directions~Directions.DEFAULT_GOOGLE_URL The Google Maps URL to use
stylesArray.<Object.<strng, Object>> <optional>
The Google Maps styles to use (see https://developers.google.com/maps/documentation/javascript/style-reference)
togglejQuery | 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 fromstring <optional>
The origin location
tostring The destination location
modegoogle.maps.DirectionsTravelMode The directions mode
facilitystring The name of the destination
returnFocusJQuery | 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 responseObject The Google response
statusgoogle.maps.DirectionsStatus The status of the response