-
-
-
-
diff --git a/examples/svg.js b/examples/svg.js
deleted file mode 100644
index 6bd24509b9fb..000000000000
--- a/examples/svg.js
+++ /dev/null
@@ -1,103 +0,0 @@
-// The MIT License (MIT)
-//
-// Copyright (c) 2019-2024 Camptocamp SA
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy of
-// this software and associated documentation files (the "Software"), to deal in
-// the Software without restriction, including without limitation the rights to
-// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-// the Software, and to permit persons to whom the Software is furnished to do so,
-// subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in all
-// copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-import angular from 'angular';
-import './svg.css';
-import EPSG2056 from 'ngeo/proj/EPSG_2056';
-import Map from 'ol/Map';
-import View from 'ol/View';
-import LayerVector from 'ol/layer/Vector';
-import SourceVector from 'ol/source/Vector';
-import Feature from 'ol/Feature';
-import Point from 'ol/geom/Point';
-import Style from 'ol/style/Style';
-import Icon from 'ol/style/Icon';
-import gmfMapComponent from 'gmf/map/component';
-import options from './options';
-
-/** @type {!angular.IModule} **/
-const appmodule = angular.module('app', ['gettext', gmfMapComponent.name]);
-
-/**
- * @class
- * @hidden
- */
-function MainController() {
- const source = new SourceVector();
- const feature1 = new Feature({
- geometry: new Point([2599000, 1200000]),
- });
- feature1.setStyle([
- new Style({
- image: new Icon({
- // @ts-ignore: webpack
- src: 'data:image/svg+xml;base64,' + btoa(require('./inline.svg')),
- // For IE compatibility
- imgSize: [65, 65],
- }),
- }),
- ]);
- source.addFeature(feature1);
- const feature2 = new Feature({
- geometry: new Point([2600000, 1200000]),
- });
- feature2.setStyle([
- new Style({
- image: new Icon({
- // @ts-ignore: webpack
- src: 'data:image/svg+xml;base64,' + btoa(require('./inline.svg?viewbox&width=30px')),
- // For IE compatibility
- imgSize: [30, 30],
- }),
- }),
- ]);
- source.addFeature(feature2);
- const feature3 = new Feature({
- geometry: new Point([2601000, 1200000]),
- });
- feature3.setStyle([
- new Style({
- image: new Icon({
- // @ts-ignore: webpack
- src: require('./url.svg?url'),
- // For IE compatibility
- imgSize: [65, 65],
- }),
- }),
- ]);
- source.addFeature(feature3);
- this.map = new Map({
- layers: [
- new LayerVector({
- source,
- }),
- ],
- view: new View({
- projection: EPSG2056,
- resolutions: [200, 100, 50, 20, 10, 5, 2.5, 2, 1],
- center: [2600000, 1200000],
- zoom: 4,
- }),
- });
-}
-appmodule.controller('MainController', MainController);
-options(appmodule);
-export default appmodule;
diff --git a/package.json b/package.json
index a5d4a12c308f..eeb30b6e3172 100644
--- a/package.json
+++ b/package.json
@@ -42,7 +42,8 @@
},
"bin": {
"compile-catalog": "buildtools/compile-catalog.js",
- "check-example": "buildtools/check-example.js"
+ "check-example": "buildtools/check-example.js",
+ "svg-viewbox": "buildtools/svg-viewbox-cmd.js"
},
"browser": {
"ngeo/test": "./test/spec",
@@ -199,7 +200,6 @@
"start-server-and-test": "2.0.5",
"strip-bom": "5.0.0",
"style-loader": "2.0.0",
- "svg-inline-loader": "0.8.2",
"svgo": "3.3.2",
"svgo-loader": "3.0.3",
"terser": "5.31.3",
diff --git a/src/auth/FormElement.ts b/src/auth/FormElement.ts
index ea65e432577c..ca5f8febd7ce 100644
--- a/src/auth/FormElement.ts
+++ b/src/auth/FormElement.ts
@@ -25,7 +25,7 @@ import GmfBaseElement from 'gmfapi/elements/BaseElement';
import {Message, MessageType} from 'ngeo/message/Message';
import ngeoMessageNotification from 'ngeo/message/Notification';
import {unsafeSVG} from 'lit/directives/unsafe-svg';
-import loadingSvg from 'gmf/icons/spinner.svg';
+import loadingSvg from 'gmf/icons/spinner';
import {gmfBackgroundlayerStatus} from 'ngeo/backgroundlayerselector/status';
import user, {User, UserState} from 'gmfapi/store/user';
// @ts-ignore
@@ -225,12 +225,7 @@ export default class GmfAuthForm extends GmfBaseElement {
${this.isLoading
? html`
diff --git a/src/icons/README.md b/src/icons/README.md
new file mode 100644
index 000000000000..04e8e3200904
--- /dev/null
+++ b/src/icons/README.md
@@ -0,0 +1,9 @@
+The icons that includes in the HTML are generated from the corresponding icon.
+
+They are generated by the following:
+
+```bash
+cp src/icons/.svg src/icons/-1em.svg
+node_modules/.bin/svgo src/icons/-1em.svg
+node buildtools/svg-viewbox-cmd.js src/icons/-1em.svg 'height=1em'
+```
diff --git a/src/icons/spinner.ts b/src/icons/spinner.ts
new file mode 100644
index 000000000000..2c12a99e37f5
--- /dev/null
+++ b/src/icons/spinner.ts
@@ -0,0 +1,23 @@
+// The MIT License (MIT)
+//
+// Copyright (c) 2024 Camptocamp SA
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy of
+// this software and associated documentation files (the "Software"), to deal in
+// the Software without restriction, including without limitation the rights to
+// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+// the Software, and to permit persons to whom the Software is furnished to do so,
+// subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// svgo of spinner.svg
+export default ``;
diff --git a/src/import/importdatasourceComponent.html b/src/import/importdatasourceComponent.html
index ad35c48e70e2..0b9cd66ffa09 100644
--- a/src/import/importdatasourceComponent.html
+++ b/src/import/importdatasourceComponent.html
@@ -63,9 +63,107 @@