new Directions(mapTarget, routeTarget, urlopt)
nyc.Directions
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
mapTarget |
string | Element | JQuery | The HTML DOM element on which to render the map for displaying the direction routes | ||
routeTarget |
string | Element | JQuery | The HTML DOM element in list route descriptions | ||
url |
string |
<optional> |
nyc.Directions.DEFAULT_GOOGLE_URL | The Google Maps URL to use |
- Source:
Members
(static, constant) DEFAULT_GOOGLE_URL :string
The default URL for loading Google APIs
Type:
- string
- Source:
(static) EventType :string
Enumeration for directions event type
Type:
- string
Properties:
Name | Type | Description |
---|---|---|
CHANGED |
string | The change event type |
- Source:
Methods
directions(args)
Get directions
Parameters:
Name | Type | Description |
---|---|---|
args |
nyc.Directions.Request | The arguments describing the requested directions |
- Source:
init()
Initializes the class on callback from the Google Maps
- Source:
Type Definitions
Request
Object type for getting directions
Type:
- Object
Properties:
Name | Type | Attributes | 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 |
- Source:
Response
Object type for getting directions
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
response |
Object | The Google response |
status |
google.maps.DirectionsStatus | The status of the response |
- Source:
Events
changed
The class has completed initialization
Type:
- Source: