From 8b2d179486e2599c2a80bf3f248b2575612ea94c Mon Sep 17 00:00:00 2001 From: Manuel Kasper Date: Mon, 8 May 2023 14:45:47 +0200 Subject: [PATCH] Fix IGN map link --- package.json | 10 ++++------ src/components/Coordinates.vue | 3 ++- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 996500f..0d114da 100644 --- a/package.json +++ b/package.json @@ -3,13 +3,11 @@ "version": "0.1.0", "private": true, "scripts": { - "serve": "vue-cli-service serve", + "serve": "export SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve", "prebuild": "vsvg -s ./svg-icons -t ./src/compiled-icons", - "build": "vue-cli-service build", - "lint": "vue-cli-service lint", - "generate-icons": "vsvg -s ./svg-icons -t ./src/compiled-icons", - "deploy": "gzip -fk9 dist/js/*.js dist/css/*.css && rsync -av dist/* root@vs5.ksys.ch:/data/www", - "deploy:beta": "gzip -fk9 dist/js/*.js dist/css/*.css && rsync -av --delete dist/* root@vs5.ksys.ch:/data/www/beta" + "build": "export SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build", + "lint": "export SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service lint", + "generate-icons": "vsvg -s ./svg-icons -t ./src/compiled-icons" }, "dependencies": { "@dsb-norge/vue-keycloak-js": "github:manuelkasper/vue-keycloak-js#sotlas", diff --git a/src/components/Coordinates.vue b/src/components/Coordinates.vue index 96b3356..495c940 100644 --- a/src/components/Coordinates.vue +++ b/src/components/Coordinates.vue @@ -129,7 +129,8 @@ export default { name: 'IGN', url: () => { if (this.reference && this.reference.match('^(EA[1-9]|ZB2)/')) { - return `https://www.ign.es/iberpix2/visor/?&x=${this.longitude}&y=${this.latitude}&level=15&srid=4258&visible=MTN` + let p = this.convertLatLonToGrid(this.latitude, this.longitude, 'EPSG:3857') + return `https://componentes.cnig.es/api-core/?center=${p[0]},${p[1]}&zoom=16&controls=scale*true&plugins=toc,zoompanel,measurebar,mousesrs&layers=WMTS*https://www.ign.es/wmts/mapa-raster?*MTN*GoogleMapsCompatible*Map*false*image/jpeg*false*false*true&projection=EPSG:3857*m` } } },