#2 change image + map backgrounds

This commit is contained in:
nobohan 2021-05-25 10:43:11 +02:00
parent 7be5beff96
commit 02a8bb9088
4 changed files with 36 additions and 39 deletions

View File

@ -33,19 +33,29 @@ appuser@ab136184159a:~/citizen/$ cd frontend
appuser@ab136184159a:~/citizen/frontend$ npm run ng build -- --configuration=fr --prod
```
## Modifier la config du front end
- faire des modifications dans `patches/frontend/conf`
- Builder le front (cfr commande ci-dessus)
- remise en route du service (cfr commande ci-desssus)
- arrêter le container et remise en route du service (cfr commande ci-desssus)
## Modifier les images (e.g., image de fond)
Certaines images sont servies sur api/media, d'autres dans assets!
### 1) Les images servies sur api/media/
- changer les fichiers dans `patches/frontend/src/assets/`
- copier ces fichiers dans le dossier `media`
- copier ces fichiers dans le dossier `media`:
```
$ docker-compose exec citizen bash
appuser@ab136184159a:~/citizen/$ cp -r frontend/src/assets/* media
```
- arrêter le container et remise en route du service (cfr commande ci-desssus)
### 2) Les images servies sur assets/
- changer les fichiers dans `patches/frontend/src/assets/`
- Builder le front (cfr commande ci-dessus)
- arrêter le container et remise en route du service (cfr commande ci-desssus)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -45,56 +45,35 @@ export const MAP_CONFIG = {
// },
{
name: "OpenTopoMap",
maxZoom: 17,
maxZoom: 19,
layer: "//{s}.opentopomap.org/{z}/{x}/{y}.png",
subdomains: "abc",
attribution: "© OpenTopoMap"
},
{
name: "OpenCycleMap - Belgique",
maxZoom: 17,
name: "Cyclosm - Belgique",
maxZoom: 19,
layer: "//{s}.tiles.champs-libres.be/cyclosm/{z}/{x}/{y}.png",
subdomains: "abc",
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors. Map style by Cyclosm. Tiles by Champs-Libres.'
},
{
name: "WMS SPW ortho",
maxZoom: 17,
layer: "//geoservices.wallonie.be/arcgis/services/IMAGERIE/ORTHO_2019/MapServer/WMSServer?",
name: "Imagerie aérienne Wallonie",
maxZoom: 20,
layer: "//geoservices.wallonie.be/arcgis/services/IMAGERIE/ORTHO_LAST/MapServer/WMSServer?",
layers: '0',
wms: true,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors. Map style by Cyclosm. Tiles by Champs-Libres.'
attribution: '&copy; SPW'
},
{
name: "IGN Vue satellite",
maxZoom: 17,
layer: 'https://geoservices.wallonie.be/arcgis/rest/services/IMAGERIE/ORTHO_LAST/MapServer/WMTS?&REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE=normal&TILEMATRIXSET=PM&FORMAT=image/jpeg&LAYER={layerName}&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}',
//layer: "https://wxs.ign.fr/{apiKey}/geoportail/wmts?&REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE=normal&TILEMATRIXSET=PM&FORMAT=image/jpeg&LAYER={layerName}&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}",
layerName: "ORTHOIMAGERY.ORTHOPHOTOS",
// Remplacer "pratique" par votre clé IGN
apiKey: 'pratique',
subdomains: "abc",
attribution: "© IGN-F/Geoportail"
name: "Plan de secteur",
minZoom: 12,
maxZoom: 20,
layer: "//geoservices.wallonie.be/arcgis/services/AMENAGEMENT_TERRITOIRE/PDS/MapServer/WMSServer?",
layers: '2',
wms: true,
attribution: '&copy; SPW'
},
{
name: "IGN Cartes HELLO C EST UNE MODIF",
maxZoom: 17,
layer: "https://wxs.ign.fr/{apiKey}/geoportail/wmts?&REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE=normal&TILEMATRIXSET=PM&FORMAT=image/jpeg&LAYER={layerName}&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}",
layerName: "GEOGRAPHICALGRIDSYSTEMS.MAPS",
// Remplacer "pratique" par votre clé IGN
apiKey: 'pratique',
subdomains: "abc",
attribution: "© IGN-F/Geoportail"
},
// {
// // ⚠ google's terms&conditions
// // https://github.com/Leaflet/Leaflet/blob/master/FAQ.md#i-want-to-use-google-maps-api-tiles-with-leaflet-can-i-do-that
// name: "GoogleSatellite",
// maxZoom: 20,
// layer: "//mt{s}.google.com/vt/lyrs=s&x={x}&y={y}&z={z}",
// subdomains: "1",
// attribution: "© GoogleMap"
// }
],
CENTER: [46.52863469527167, 2.43896484375],
ZOOM_LEVEL: 6,

View File

@ -26,13 +26,21 @@
maxZoom: 20
}),
WMS: L.tileLayer.wms('https://geoservices.wallonie.be/arcgis/services/IMAGERIE/ORTHO_2019/MapServer/WMSServer?', {
ORTHO: L.tileLayer.wms('https://geoservices.wallonie.be/arcgis/services/IMAGERIE/ORTHO_2019/MapServer/WMSServer?', {
attribution: '&copy; SPW',
layers: '0',
format: 'image/png',
transparent: true,
}),
PDS: L.tileLayer.wms('https://geoservices.wallonie.be/arcgis/services/AMENAGEMENT_TERRITOIRE/PDS/MapServer/WMSServer?', {
attribution: '&copy; SPW',
layers: '2',
format: 'image/png',
transparent: true,
minZoom: 12
}),
//https://wxs.ign.fr/{apiKey}/geoportail/wmts?&REQUEST=GetTile&SERVICE=WMTS
//&VERSION=1.0.0&STYLE=normal&TILEMATRIXSET=PM&FORMAT=image/jpeg
//&LAYER={layerName}&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}",