new Legend(options)
Controls/Editor/Legend.js, line 54
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object |
options for function call.
|
Example
var legend = new Legend ({
target : ...,
position : 1, // identifiant de position (unique !)
sprites : {
url : "http://localhost/sprites.png",
size : { w : 450, h : 550 },
json : {
icon-1 : {x:,y:,height:,width:,pixelRatio:},
icon-2 : {x:,y:,height:,width:,pixelRatio:}
}
},
obj : {
title : "",
editable : true, // tag non standard issue du style json dédié à l'edition
paint : {"fill-color": "#2BB3E1"},
layout : {visibility:"none"}
}
});
legend.add();
legend.display(true);
legend.isEditable();
legend.getRenderContainer();
legend.getToolsContainer();
legend.getContainer();
Members
-
staticol.style.editor.Legend.PROPERTIES
-
List of supported properties
Methods
-
add(){Object}
Controls/Editor/Legend.js, line 877 -
Add element into target DOM
Returns:
instance
-
display(display){Boolean}
Controls/Editor/Legend.js, line 901 -
Set display container or get
Name Type Description display Boolean show/hidden container or get status
-
getContainer(){DOMElement}
Controls/Editor/Legend.js, line 947 -
Get container (DOM)
Returns:
element
-
getRenderContainer(){DOMElement}
Controls/Editor/Legend.js, line 926 -
Get container Legend Render (DOM)
- See:
-
- Layer.prototype.slotLegend()
Returns:
element
Example
-
getToolsContainer(){DOMElement}
Controls/Editor/Legend.js, line 938 -
Get container Legend Tools (DOM)
- See:
-
- Layer.prototype.slotLegend()
Returns:
element
Example
... -
isEditable(){Boolean}
Controls/Editor/Legend.js, line 914 -
Is editable