Skip to content

Commit

Permalink
Prend en compte si le lien IGN est "non libre"...
Browse files Browse the repository at this point in the history
... Ajout d'une propriété "private" qui est true ou false dans le carte.json
+ etude.json pour la couverture hydraulique

Issue: #203376
Change-Id: Ic920ca18ec7b48c134413aab877a1d799440c0e8
  • Loading branch information
Emilie Genton committed Jan 17, 2024
1 parent 45a4eae commit 92d3b21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions client-ng/src/components/OlMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ import Indicateur from './Indicateur.vue'
import { getSrid } from './utils/FunctionsUtils.js';
const IGN_URL = 'https://data.geopf.fr/wmts'
const IGN_URL_PRIVATE = 'https://data.geopf.fr/private/wmts?apikey=ign_scan_ws'
export default {
name: 'OlMap',
Expand Down Expand Up @@ -813,7 +814,7 @@ export default {
return wmsLayer
},
createIGNLayer(layerDef) {
layerDef.url = IGN_URL;
layerDef.url = layerDef.isPrivate == true ? IGN_URL_PRIVATE : IGN_URL;
layerDef.projection = 'EPSG:3857'
layerDef.matrixSet = 'PM'
layerDef.attribution = '<a href="http://www.geoportail.fr/" target="_blank">' + '<img src="/remocra/images/remocra/cartes/logo_gp.gif"></a>' + '<a href="http://www.geoportail.gouv.fr/depot/api/cgu/licAPI_CGUF.pdf" ' +
Expand All @@ -835,7 +836,7 @@ export default {
visibility: layerDef.visibility,
opacity: layerDef.opacity,
projection: layerDef.projection || 'EPSG:3857',
url: IGN_URL,
url: layerDef.isPrivate == true ? IGN_URL_PRIVATE : IGN_URL,
tileMatrixSet: {
nom: 'PM',
resolution_min: 0.5971642834779,
Expand Down
2 changes: 1 addition & 1 deletion remocra/src/main/webapp/js/app/remocra/widget/map/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ Ext.define('Sdis.Remocra.widget.map.Map', {
},

createIGNLayer: function(layerDef) {
layerDef.url = 'https://data.geopf.fr/wmts';
layerDef.url = layerDef.isPrivate == true ? 'https://data.geopf.fr/private/wmts?apikey=ign_scan_ws' : 'https://data.geopf.fr/wmts';
layerDef.projection = 'EPSG:3857';
layerDef.matrixSet = 'PM';
layerDef.attribution = '<a href="http://www.geoportail.fr/" target="_blank">'
Expand Down

0 comments on commit 92d3b21

Please sign in to comment.