diff --git a/docs/app/event/LegendsLayerSet/LegendsLayerSet-event-managment.md b/docs/app/event/LegendsLayerSet/LegendsLayerSet-event-managment.md index 8bc737521f9..2b39d9060ff 100644 --- a/docs/app/event/LegendsLayerSet/LegendsLayerSet-event-managment.md +++ b/docs/app/event/LegendsLayerSet/LegendsLayerSet-event-managment.md @@ -20,7 +20,7 @@ The `layerPath` parameter is used to link the legend to the layer entry configur The class can be instantiated using the constructor or the create method. At creation time, the constructor instantiates a `LayerSet` object which will send a `LAYER_SET.REQUEST_LAYER_INVENTORY` event using a `mapId/LayerSetId` handler in order to get the list of all the layerPaths existing on the map. Throughout its existence, the `LegendsLayerSet` instance listens, through its `LayerSet` property, to the `LAYER_SET.LAYER_REGISTRATION` events that are emitted when a layer is created/destroyed on the map or in response to the inventory request to update its `ResultSet` property. It also listens to the `GET_LEGENDS.LEGEND_INFO` event. This listener receives the legend information returned by the layer's `getLegend` call and store it in the `LayerSet`. If all the registered layers have their legend information, a `GET_LEGENDS.LEGENDS_LAYERSET_UPDATED` event is triggered with a `mapId/LayerSetId` handler. -When created, the `LegendsLayerSet` is in a idle state. To start it, the instance listens to a `GET_LEGENDS.TRIGGER` event. This event is only listen once and when it is received, a `LAYER_SET.UPDATED` listener is attached to the instance to wait for `LayerSet` modifications. Then, a `GET_LEGENDS.QUERY_LEGEND` event will be emited to all undefined legend of the `LayerSet` to obtain the legends. +When the `LegendsLayerSet` is created, a `LAYER_SET.UPDATED` listener is attached to the instance to wait for `LayerSet` modifications. Then, a `GET_LEGENDS.QUERY_LEGEND` event will be emited to all undefined legend of the `LayerSet` to obtain the legends. The `LAYER_SET.UPDATED` listener will catch layer add/remove applied to the map. If a layer is added, a `GET_LEGENDS.QUERY_LEGEND` event will be emited for it and when all the registered layers have received their legend information, a `GET_LEGENDS.LEGENDS_LAYERSET_UPDATED` event is emited using the `mapId/LayerSetId` as handler. The `GET_LEGENDS.LEGENDS_LAYERSET_UPDATED` event is also emited when a layer is removed from the map to signal that a legend has been removed. diff --git a/packages/geoview-core/public/css/style.css b/packages/geoview-core/public/css/style.css index 30a9e5225e0..af11cc4f975 100644 --- a/packages/geoview-core/public/css/style.css +++ b/packages/geoview-core/public/css/style.css @@ -152,3 +152,32 @@ td { text-align: center; font-size: smaller; } + +table.info, th.info, td.info, th.infoCol1, td.infoCol1 { + border: 1px solid black; +} +th.info, td.info, th.infoCol1, td.infoCol1 { + padding: 15px; + width: 15%; +} +th.info, th.infoCol1, td.infoCol1 { + text-align: left; + font-weight: bold; + font-size: 15px; +} + +table.state { + font-family: arial, sans-serif; + border-collapse: collapse; + width: 100%; +} + +td.state, th.state { + border: 1px solid #dddddd; + text-align: left; + padding: 8px; +} + +table.state { + display: flex; +} diff --git a/packages/geoview-core/public/templates/codedoc.js b/packages/geoview-core/public/templates/codedoc.js index 9dacae4e61f..c536d023c97 100644 --- a/packages/geoview-core/public/templates/codedoc.js +++ b/packages/geoview-core/public/templates/codedoc.js @@ -69,15 +69,14 @@ function createCollapsible() { let i; for (i = 0; i < coll.length; i++) { + const content = coll[i].nextElementSibling; + if (coll[i].classList.contains('active')) content.style.display = 'block'; + else content.style.display = 'none'; // eslint-disable-next-line func-names coll[i].addEventListener('click', function () { this.classList.toggle('active'); - const content = this.nextElementSibling; - if (content.style.display === 'block') { - content.style.display = 'none'; - } else { - content.style.display = 'block'; - } + if (this.classList.contains('active')) content.style.display = 'block'; + else content.style.display = 'none'; }); } } @@ -112,6 +111,7 @@ function wireLogs(api, mapId, logsDomId) { (payload) => { // Log the event addLog(logsDomId, payload.event); + // eslint-disable-next-line no-console console.log(payload); }, mapId diff --git a/packages/geoview-core/public/templates/layers/esri-dynamic.html b/packages/geoview-core/public/templates/layers/esri-dynamic.html index 86556ee8757..7930fc65216 100644 --- a/packages/geoview-core/public/templates/layers/esri-dynamic.html +++ b/packages/geoview-core/public/templates/layers/esri-dynamic.html @@ -66,9 +66,10 @@
Click on feature on the map+
Click on feature on the map+ +
Comming soon!
Click on feature on the map+
Click on feature on the map+ +
Comming soon!
Click on feature on the map+
Click on feature on the map+ +
Comming soon!