Optional
callback?: Functionwith a callback, the implementation is your responsibility
Optional
control?: anyinstance of control
Optional
description?: stringexport description put into file
Optional
direction?: stringbuttons and menus layout
Optional
download?: stringtriggering the download of the file
Optional
format?: stringgeojson / kml / gpx
Optional
icons?: { button?: string; menu?: string }icons
Optional
button?: stringdisplays the button icon : save or export icon, or otherwise left blank if you don't want it
Optional
menu?: stringdisplays the menu icon, or otherwise left blank if you don't want it
Optional
id?: numberAbility to add an identifier on the widget (advanced option)
Optional
kind?: stringbutton type : primary | secondary | tertiary
Optional
layer?: anythe layer instance is retrieved from the control, but you can defined it
Optional
menu?: booleandisplays the menu
Optional
menuOptions?: {options of the menu.
Optional
above?: booleandisplays menu above or not of the button
Optional
labelDesc?: booleandisplays the label description
Optional
labelName?: booleandisplays the label name
Optional
outside?: booleandisplays all element outside of menu
Optional
selectFormat?: booleandisplays the select format
Optional
name?: stringexport name file
Optional
target?: HTMLElementtarget where the button will plug in. By default, the target is 'container-buttons-plugin' into the wikdget
Optional
title?: stringbutton name
// pluggued widget Export into control Isocurve
var iso = new ol.control.Isocurve();
map.addControl(iso);
// method : call render()
var export = new ButtonExport();
export.setDownload(true);
export.setControl(iso);
export.setTarget(<!-- HTMLElement -->);
export.setName("export");
export.setFormat("geojson");
export.setDescription("Export Isochrone");
export.setTitle("Exporter");
export.setMenu(true);
export.setMenuOptions({
outside : false,
labelName : true,
labelDesc : true,
selectFormat : true
});
export.render(); // <-- direct call to render function !
export.on("button:clicked", (data) => { console.log(data); });
// method : call map.addControl()
var export = new ButtonExport();
export.setDownload(true);
export.setControl(iso);
export.setTarget(<!-- HTMLElement -->);
export.setName("export");
export.setFormat("geojson");
export.setDescription("Export Isochrone");
export.setTitle("Exporter");
export.setKind("secondary");
export.setMenu(false);
export.on("button:clicked", (data) => { console.log(data); });
map.addControl(export); // <-- using the OpenLayers mechanism, don't call to render function !
// use control options instead of setters
var export = new ButtonExport({
download : true,
control : iso,
target : <!-- HTMLElement -->,
name : "export",
description : "Export Isochrone",
format : "geojson",
title : "Exporter",
menu : false,
callback : (content, layer) => {
console.log(content, layer);
}
});
map.addControl(export);
// method with passing option into the control Isocurve
var iso = new ol.control.Isocurve({ export : true });
// with control options :
var iso = new ol.control.Isocurve({ export : {
download : false,
name : "save-iso",
format : "geojson",
title : "Sauvegarde",
menu : true
}});
Protected
disposedThe object has already been disposed.
Protected
elementResponse to the export of the isochron calculation (only for jsdoc)
// GeoJSON format
{
"type":"FeatureCollection",
"features":[...],
"geoportail:compute":{
"transport":"Pieton",
"computation":"time",
"exclusions":[
],
"direction":"departure",
"point":[ 2.587835382718464, 48.84192678293002 ],
"results":{
"message":"",
"id":"",
"location":{
"x":"2.587835382718464",
"y":"48.84192678293002"
},
"srs":"EPSG:4326",
"geometry":{
"type":"Polygon",
"coordinates":[[...]]
},
"time":180,
"distance":""
}
}
}
Response to the export of the profile calculation (only for jsdoc)
// GeoJSON format
{
"type":"FeatureCollection",
"features":[...],
"geoportail:compute":{
"greaterSlope":76,
"meanSlope":7,
"distancePlus":84,
"distanceMinus":48,
"ascendingElevation":5,
"descendingElevation":-4,
"altMin":"92,04",
"altMax":"96,71",
"distance":163,
"unit":"m",
"points":[
{
"z":95.68,
"lon":2.5874,
"lat":48.8419,
"acc":2.5,
"dist":0,
"slope":0
}
]
}
}
Response to the export of the route calculation (only for jsdoc)
Protected
listenerKey name.
Listener.
Type.
Listener.
Protected
applyProtected
Apply any properties from another object without triggering events.
The source object.
Dispatches an event and calls all listeners listening for events
of this type. The event parameter can either be a string or an
Object with a type
property.
Event object.
false
if anyone called preventDefault on the
event object or if any of the listeners returned false.
Clean up.
Protected
disposeProtected
Extension point for disposable objects.
Get container
container
Get the listeners for a specified event type. Listeners are returned in the order that they will be called in.
Type.
Listeners.
Get an object of all property names and values.
Object.
Optional
type: stringType. If not provided,
true
will be returned if this event target has any listeners.
Has listeners.
The object has properties.
Key name.
Old value.
Protected
onceProtected
onKey name.
Listener.
Type.
Listener.
Render DOM
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
Protected
unProtected
Unlisten for a certain type of event.
Type.
Listener.
options for function call.