Skip to content

Commit 484fc09

Browse files
authored
Merge branch 'main' into refacto/ui_gfi
2 parents 558706f + a666dcd commit 484fc09

File tree

13 files changed

+2665
-494
lines changed

13 files changed

+2665
-494
lines changed

DRAFT_CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ __DATE__
1919

2020
* 🔨 [Changed]
2121

22+
- LayerSwitcher : refonte complète de l'outil (#434)
2223
- Contextual Menu : Changement nom de l'entrée isochrone (3d228a692c8d51155bbdf8c8c32bb51629b6a03f)
2324
- GetFeatureInfo : corrections diverse sur l'UI du panel de résultats (#448)
2425

samples-src/pages/tests/Catalog/pages-ol-catalog-modules-dsfr-type-data.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
<link rel="stylesheet" href="{{ baseurl }}/dist/modules/GpfExtOlCatalog.css" />
66
<script src="{{ baseurl }}/dist/modules/GpfExtOlCatalog.js"></script>
7+
<link rel="stylesheet" href="{{ baseurl }}/dist/modules/GpfExtOlLayerSwitcher.css" />
8+
<script src="{{ baseurl }}/dist/modules/GpfExtOlLayerSwitcher.js"></script>
9+
<script src="{{ baseurl }}/dist/modules/GpfExtOlLayers.js"></script>
710
{{/content}}
811

912
{{#content "head"}}
@@ -73,6 +76,24 @@ <h2>Ajout du gestionnaire de catalogue avec option sur la configuration</h2>
7376
});
7477
map.addControl(catalog);
7578
})
79+
80+
layerSwitcher = new ol.control.LayerSwitcher({
81+
options : {
82+
position : "bottom-right",
83+
collapsed : false,
84+
panel : true,
85+
counter : true
86+
}
87+
});
88+
89+
layerSwitcher.on("layerswitcher:add", function (e) {
90+
console.warn("layer", e, e.layer);
91+
});
92+
layerSwitcher.on("layerswitcher:remove", function (e) {
93+
console.warn("layer", e, e.layer);
94+
});
95+
96+
map.addControl(layerSwitcher);
7697
};
7798
Gp.Services.getConfig({
7899
customConfigFile : "{{ resources }}/data/configuration/config-catalog.json",

0 commit comments

Comments
 (0)