MapBox Legend management
ol.style.editor.Legend
options for function call.
...
(internal) ...
{h:, w:} ...
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(); Copy
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();
Static
List of supported properties
Add element into target DOM
Set display container or get
show/hidden container or get status
Get container (DOM)
DOM element
Get container Legend Render (DOM)
Layer.prototype.slotLegend()
<div class="GPEditorMapBoxLegendRender legend-(line|fill|background|text|icon|circle|unknow)" style="..."></div> Copy
<div class="GPEditorMapBoxLegendRender legend-(line|fill|background|text|icon|circle|unknow)" style="..."></div>
Get container Legend Tools (DOM)
<div class="GPEditorMapBoxLegendToolsContainer">...</div> Copy
<div class="GPEditorMapBoxLegendToolsContainer">...</div>
Is editable
Classdesc
MapBox Legend management
Alias
ol.style.editor.Legend
Param: options
options for function call.
Param: options.target
...
Param: options.position
...
Param: options.id
(internal) ...
Param: options.sprites
...
Param: options.sprites.url
...
Param: options.sprites.size
{h:, w:} ...
Param: options.sprites.json
...
Param: options.obj
...
Param: options.obj.title
...
Param: options.obj.editable
...
Param: options.obj.paint
...
Param: options.obj.layout
...
Example