Extends: L.Class
Options | Value | Description |
---|---|---|
options | object | accessToken is a required property unless L.mapbox.accessToken is set globally. profile is optional and defaults to mapbox.driving . |
Returns the origin of the current route.
Returns: the origin
Sets the origin of the current route.
Returns: this
Returns the destination of the current route.
Returns: the destination
Sets the destination of the current route.
Returns: this
Add a waypoint to the route at the given index. waypoint
can be a GeoJSON Point Feature or a L.LatLng
.
Returns: this
Remove the waypoint at the given index from the route.
Returns: this
Change the waypoint at the given index. waypoint
can be a GeoJSON Point Feature or a L.LatLng
.
Returns: this
Swap the origin and destination.
Returns: this
Send a directions query request. opts
can contain a proximity
LatLng object for geocoding origin/destination/waypoint strings.
Returns: this
Extends: L.LayerGroup
Create a new layer that displays a given set of directions on a map.
Options | Value | Description |
---|---|---|
options | object | readonly (optional). If set to true marker and linestring interaction is disabled. |
Add this control to a given map object.
Returns: this
Add this control to a given map object.
Returns: this
Add this control to a given map object.
Returns: this