diff --git a/frontend/app-config/webpack.config.js b/frontend/app-config/webpack.config.js index 0f719a34a9..3c9f9cbe3f 100644 --- a/frontend/app-config/webpack.config.js +++ b/frontend/app-config/webpack.config.js @@ -272,6 +272,12 @@ module.exports = function calculateConfig(env) { { from: './node_modules/ace-builds/src-min/snippets', to: 'dependencies/ace/snippets' }, { from: './node_modules/ace-builds/src-min/worker-*.js', to: 'dependencies/ace/[name][ext]' }, + { from: './node_modules/leaflet-control-geocoder/dist/Control.Geocoder.css', to: 'dependencies/leaflet' }, + { from: './node_modules/leaflet-control-geocoder/dist/Control.Geocoder.min.js', to: 'dependencies/leaflet' }, + { from: './node_modules/leaflet/dist/leaflet.js', to: 'dependencies/leaflet' }, + { from: './node_modules/leaflet/dist/leaflet.css', to: 'dependencies/leaflet' }, + { from: './node_modules/leaflet/dist/images', to: 'dependencies/leaflet/images' }, + { from: './node_modules/video.js/dist/video.min.js', to: 'dependencies/videojs' }, { from: './node_modules/video.js/dist/video-js.min.css', to: 'dependencies/videojs' }, diff --git a/frontend/app/shared/components/forms/geolocation-editor.component.html b/frontend/app/shared/components/forms/geolocation-editor.component.html index 200060741a..883bda0164 100644 --- a/frontend/app/shared/components/forms/geolocation-editor.component.html +++ b/frontend/app/shared/components/forms/geolocation-editor.component.html @@ -1,5 +1,7 @@ -
- +
diff --git a/frontend/app/shared/components/forms/geolocation-editor.component.ts b/frontend/app/shared/components/forms/geolocation-editor.component.ts index c7037eaf37..d01cfd4d5c 100644 --- a/frontend/app/shared/components/forms/geolocation-editor.component.ts +++ b/frontend/app/shared/components/forms/geolocation-editor.component.ts @@ -177,9 +177,9 @@ export class GeolocationEditorComponent extends StatefulControlComponent { this.map = L.map(this.editor.nativeElement).fitWorld(); @@ -188,7 +188,7 @@ export class GeolocationEditorComponent extends StatefulControlComponentOpenStreetMap contributors', }).addTo(this.map); - this.resourceLoader.loadScript('https://cdnjs.cloudflare.com/ajax/libs/perliedman-leaflet-control-geocoder/1.9.0/Control.Geocoder.min.js') + this.resourceLoader.loadLocalScript('dependencies/leaflet/Control.Geocoder.min.js') .then(() => { L.Control.geocoder({ defaultMarkGeocode: false, diff --git a/frontend/package-lock.json b/frontend/package-lock.json index d914a1b8ea..daf72fb424 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -6484,6 +6484,19 @@ "webpack-sources": "^1.1.0" } }, + "leaflet": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.7.1.tgz", + "integrity": "sha512-/xwPEBidtg69Q3HlqPdU3DnrXQOvQU/CCHA1tcDQVzOwm91YMYaILjNp7L4Eaw5Z4sOYdbBz6koWyibppd8Zqw==" + }, + "leaflet-control-geocoder": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/leaflet-control-geocoder/-/leaflet-control-geocoder-2.3.0.tgz", + "integrity": "sha512-Zi5cebDsfAq6B0ZilDGn/W5oNM8pQu6cltEHBxfR56XnN3f/Lmez1+qrdyRY6oTlP740caBHHCmd35Z/eif7/w==", + "requires": { + "open-location-code": "^1.0.0" + } + }, "levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -7360,6 +7373,12 @@ "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", "dev": true }, + "open-location-code": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/open-location-code/-/open-location-code-1.0.3.tgz", + "integrity": "sha1-XqGjTuUiHGyvoEOS4b2Qb9dIj34=", + "optional": true + }, "opener": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", diff --git a/frontend/package.json b/frontend/package.json index 53f885a43a..8e3e17a81f 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -45,6 +45,8 @@ "graphql": "15.5.0", "image-focus": "1.2.0", "keycharm": "0.4.0", + "leaflet": "^1.7.1", + "leaflet-control-geocoder": "^2.3.0", "marked": "2.0.6", "mersenne-twister": "1.1.0", "mousetrap": "1.6.5",