diff --git a/package.json b/package.json index 4d8520b..c486c50 100644 --- a/package.json +++ b/package.json @@ -28,8 +28,7 @@ "process": "^0.11.10" }, "dependencies": { - "mcutils": "github:IGNF-Ma-carte/mcutils", - "xlsx": "^0.18.5" + "mcutils": "github:IGNF-Ma-carte/mcutils" }, "staticFiles": { "staticPath": "./assets", diff --git a/page/onglet/style.css b/page/onglet/style.css index 0017ec3..5b90ebb 100644 --- a/page/onglet/style.css +++ b/page/onglet/style.css @@ -79,3 +79,8 @@ ul.no-style { background-color: #eee; color: #999; } + +[data-role="menu-tab"] [data-formstyle] .ol-popup.popup-symbol .ol-popup ul { + max-height: min(20em, calc(100vh - 24em)) ; +} + diff --git a/src/layerShop/addLayer.js b/src/layerShop/addLayer.js index 2139745..c55deab 100644 --- a/src/layerShop/addLayer.js +++ b/src/layerShop/addLayer.js @@ -9,16 +9,16 @@ import addDrawLyr from './layers/addDrawLayer'; import addLayerGeoportail from './layers/addLayerGeoportail' import charte from 'mcutils/charte/charte'; -import '../../page/layerShop/addLayer.css' -import defaultLayersHTML from '../../page/layerShop/defaultLayers-page.html' -import extendedLayersHTML from '../../page/layerShop/extendedLayers-page.html' -import edugeoLayersHTML from '../../page/layerShop/edugeoLayers-page.html' - import loaders from './layers/layerLoader' import { insertLayer } from './layers/loadLayer'; import Geoportail from 'mcutils/layer/Geoportail'; import carte from '../carte'; +import '../../page/layerShop/addLayer.css' +import defaultLayersHTML from '../../page/layerShop/defaultLayers-page.html' +import extendedLayersHTML from '../../page/layerShop/extendedLayers-page.html' +import edugeoLayersHTML from '../../page/layerShop/edugeoLayers-page.html' + /** Dialog to add new file layer */ switcher.addControl(new Button({ diff --git a/src/layerShop/layers/addLayerWMS.js b/src/layerShop/layers/addLayerWMS.js index 5e9870f..eb3c493 100644 --- a/src/layerShop/layers/addLayerWMS.js +++ b/src/layerShop/layers/addLayerWMS.js @@ -66,6 +66,14 @@ const wmsCapabilities = new WMSCapabilities({ }); switcher.addControl(wmsCapabilities, 'bottom'); +// Check parameters on error to add apikey if needed (and more) +wmsCapabilities._img.addEventListener('error', () => { + const extra = wmsCapabilities._elements.input.value.split('?')[1] + if (wmsCapabilities._img.src.search(extra) < 0) { + wmsCapabilities._elements.preview.src = wmsCapabilities._img.src = wmsCapabilities._img.src + '&' + extra + } +}) + // WMTS services const wmtsServices = { 'cartes': {