new Isocurve(options)
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object |
Isocurve control options
|
Fires:
- isocurve:drawstart
- isocurve:drawend
- isocurve:compute
- export:compute
Example
var iso = ol.control.Isocurve({
"collapsed" : false,
"draggable" : true,
"export" : false,
"methods" : ["time", "distance"],
"exclusions" : {
"toll" : true,
"bridge" : false,
"tunnel" : true
},
"graphs" : ["Pieton", "Voiture"],
"markerOpts" : {
"url" : "...",
"offset" : [0,0]
}
"isocurveOptions" : {},
"autocompleteOptions" : {}
});
// if you want to pluggued the control Export with options :
var iso = new ol.control.Isocurve({
export : {
name : "export",
format : "geojson",
title : "Exporter",
menu : false
}
});
Extends
- ol.control.Control
Members
-
collapsed
-
{Boolean} specify if isocurve control is collapsed (true) or not (false)
-
draggable
-
{Boolean} specify if isocurve control is draggable (true) or not (false)
Methods
-
clean()
Controls/Isocurve/Isocurve.js, line 455 -
Clean UI : reinit control
-
compute(position, value, options)
Controls/Isocurve/Isocurve.js, line 355 -
This method is public.
It allows to control the execution of a traitment.Name Type Description position Array position in the projection map [ x, y ]
value Object distance in km or hours-minutes
options Object options = {...}
-
getCollapsed(){Boolean}
Controls/Isocurve/Isocurve.js, line 201 -
Returns true if widget is collapsed (minimized), false otherwise
Returns:
- true if widget is collapsed
-
getContainer(){DOMElement}
Controls/Isocurve/Isocurve.js, line 334 -
Get container
-
getData(){Object}
Controls/Isocurve/Isocurve.js, line 285 -
Get isocurve data
Returns:
- process results
-
getGeoJSON(){String}
Controls/Isocurve/Isocurve.js, line 263 -
Get vector layer
Returns:
- GeoJSON format layer
-
getLayer(){Object}
Controls/Isocurve/Isocurve.js, line 231 -
Get vector layer where Isocurve geometry is drawn
Returns:
- ol.layer.Vector isocurve layer
-
getStyle(){ol.style}
Controls/Isocurve/Isocurve.js, line 343 -
Get default style
-
init()
Controls/Isocurve/Isocurve.js, line 419 -
This method is public.
It allows to init the control. -
setCollapsed(collapsed)
Controls/Isocurve/Isocurve.js, line 210 -
Collapse or display widget main container
Name Type Description collapsed Boolean True to collapse widget, False to display it
-
setData(data)
Controls/Isocurve/Isocurve.js, line 310 -
Set isocurve data
Name Type Description data Object control informations
Name Type Description transport String transport type
computation String computation type
exclusions Array list of exclusions
direction String direction type
point Array [lon, lat]
results Object service response
-
setGeoJSON(geojson)
Controls/Isocurve/Isocurve.js, line 272 -
Set vector layer
Name Type Description geojson String GeoJSON format layer
-
setLayer(layer)
Controls/Isocurve/Isocurve.js, line 240 -
Set vector layer where Isocurve geometry is drawn
Name Type Description layer Object ol.layer.Vector isocurve layer
-
setMap(map)
Controls/Isocurve/Isocurve.js, line 144 -
Overwrite OpenLayers setMap method
Name Type Description map ol.Map Map.