new RoutingGeoportail( [options])
Parameters:
Name | Type | Argument | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
Properties
|
Fires:
- event:select
- change:input
- routing:start
- event:routing
- step:select
- step:hover
- event:error
- event:abort
Extends
Members
-
instructions
-
Instructions labels
Methods
-
abort()
-
Abort request
-
ajax(url, onsuccess, onerror)
-
Send an ajax request (GET)
Parameters:
Name Type Description url
string onsuccess
function callback
onerror
function callback
-
calculate(steps)
-
Calculate route
Parameters:
Name Type Description steps
Array.<ol.coordinate> | undefined an array of steps in EPSG:4326, default use control input values
Returns:
true is a new request is send (more than 2 points to calculate)
- Type
- boolean
-
getDistanceString(d)
-
Gets distance as string
Parameters:
Name Type Description d
number distance
Returns:
- Type
- string
-
getSource()
-
Get point source
Returns:
- Type
- ol.source.Vector
-
getTimeString(routing)
-
Gets time as string
Parameters:
Name Type Description routing
* routing response
Returns:
- Type
- string
-
setMap(map)
-
Set the map instance the control is associated with and add its controls associated to this map.
Parameters:
Name Type Description map
_ol_Map_ The map instance.