MapBox filter management

ol.style.editor.Layer

options for function call.

var layers = new Layer ({
target : ...,
position : 1, // identifiant de position (unique !)
tools : {
"visibility" : true, // afficher l'icone de visibilité
"icon" : {
"image" : true, // afficher l'icone "oeil" (defaut) ou une checkbox
"anchor" : "start" | "end" // afficher l'icone au debut ou à la fin (defaut)
},
"type" : true, // afficher l'icone du type de geometrie
"pin" : true, // afficher l'icone de puce
"remove" : false, // TODO afficher l'icone de suppression
"clone" : false // TODO afficher l'icone de duplication
},
obj : {
"id": "ocs - vegetation", // MANDATORY
"type": "fill", // OPTIONAL
"source": "pyramide_proto", // OPTIONAL
"source-layer": "ocs_vegetation_surf" // OPTIONAL
}
});
layers.addLegend(oLegend);
layers.slotLegend();
layers.addStyle(oStyle);
layers.addFilter(oFilter);
layers.add();
layers.active(false);
layers.visibility(false);
layers.display(false);
layers.collapse();
EventBus.addEventListener("editor:layer:onclickvisibility", function (e) {
// e.target.data : options !
// e.target.editorID : id or null
}, this);

Constructors

Properties

bSlotLegend: undefined | boolean
container: undefined | null | HTMLDivElement
DomToggle: undefined | null | HTMLLabelElement
DomVisibility: any
id: any
name:
    | undefined
    | {
        container: string;
        containerlegend: string;
        containertitle: string;
        containertools: string;
        imagelabel: string;
        imagelabelinput: string;
        target: string;
        titleinput: string;
        titlelabel: string;
        typeimg: string;
        visibilityinput: string;
        visibilityinputdisable: string;
        visibilitylabel: string;
        visibilitylabeldisable: string;
    }
oFilter: undefined | null | Filter
oLegend: undefined | null | Legend
options: any
oStyle: undefined | null | Style

Methods

  • Set disabled/enabled status or get

    Parameters

    • active: boolean

      disable/enable layer interaction or get status

    Returns boolean

    • true/false
  • Set visibility or get

    Parameters

    • display: boolean

      set visibility or undefined to get status

    Returns boolean

    • true/false