Geoportal Extension for OpenLayers API Reference

Class: Theme

ol.style.editor.Theme

Mapbox Themes management

new Theme(options)

OpenLayers/Controls/Editor/Themes.js, line 47
Name Type Description
options Object

options for function call.

Example
var theme = new Themes ({
       "target": "",
       "tools": {
         "thumbnails": true,
         "button" : {
             "visible" : true,
             "type" : "radio" (par defaut) | "checkbox"
         }
       },
       "obj": {
         "themesSummary": "", // Titre du composant (non graphique !)
         "themes": [{
            "thumbnail": "data/images/layer0.png",
            "name": "standard0",
            "url": "data/styles/layer0.json",
            "description": "",
            "selected" : true
         },{
            "thumbnail": "data/images/layer1.png",
            "name": "standard1",
            "url": "data/styles/layer1.json",
            "description": ""
         }]
       }
  });
 theme.add();
 theme.display(true);
 theme.getContainer();

Methods

add(){Object}

OpenLayers/Controls/Editor/Themes.js, line 280

Add element into target DOM

Returns:
instance

display(display){Boolean}

OpenLayers/Controls/Editor/Themes.js, line 304

Set display container or get

Name Type Description
display Boolean

show/hidden container or get status

getContainer(){DOMElement}

OpenLayers/Controls/Editor/Themes.js, line 317

Get container (DOM)

Returns:
element