Skip to content

Commit

Permalink
Merge branch 'main' into texte-synthese
Browse files Browse the repository at this point in the history
  • Loading branch information
cboucheIGN authored Dec 16, 2024
2 parents 32b5b68 + 93eb9db commit 423de47
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 6 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/docker-publish.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
on:
push:
tags:
- 'v*.*.*' # Se déclenche uniquement pour les tags au format vx.x.x
workflow_dispatch:
inputs:
version:
Expand All @@ -18,6 +21,18 @@ jobs:
packages: write

steps:
- name: Set version for build
id: set_version
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
VERSION="${{ github.event.inputs.version }}"
elif [[ "${{ github.ref_type }}" == "tag" ]]; then
VERSION="${{ github.ref_name }}"
else
echo "Error: Unsupported event type"
exit 1
fi
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Validate version input
id: validate_version
run: |
Expand Down Expand Up @@ -57,4 +72,4 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
target: 'prod' # Cible le stage (prod)
cache-from: type=gha
cache-to: type=gha,mode=max
cache-to: type=gha,mode=max
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ export class GeolocaliseFormComponent implements OnInit {
const map = this.mapContextService.getMap();
if (map) {
const searchControl = new SearchGeoportail({
type: 'StreetAddress', //Par defaut StreetAddress,PositionOfInterest
target: 'location',
maxItems: 3,
className: 'fr-input-wrap fr-input-wrap--addon'
className: 'fr-input-wrap fr-input-wrap--addon',
placeholder: 'Rechercher...'
});
map.addControl(searchControl);

Expand Down
5 changes: 5 additions & 0 deletions src/app/shared-map/services/map-context.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ export class MapContextService {
source: this.getLayerDessin().getSource(),
});
editBar.setProperties({ name: 'editBar' });
let controls : any = editBar.getControls();
controls[0].setTitle('Sélectionner un objet');
controls[0].getSubBar().getControls()[0].setTitle('Supprimer l\'objet sélectionné')
controls[1].setTitle('Dessiner un polygone');
controls[2].setTitle('Délimiter un trou dans un polygone');
this.map?.addControl(editBar);
}

Expand Down
10 changes: 10 additions & 0 deletions src/app/shared-reglementation/models/reglementation-list.enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,16 @@ export const REGLEMENTATION_LIST = [
referenceUrl: '',
contact: 'UDAP du département'
}),
new Reglementation().deserialise({
thematicName: 'Patrimoine',
layerName: 'Sites inscrits et classés',
title: 'Sites inscrits et classés',
description: '<p> Les sites inscrits sont des sites présentant un intérêt général, notamment du point de vue artistique, historique, scientifique,légendaire ou pittoresque.</p><p> Les sites classés sont des sites remarquables, dans lesquels le caractère paysager est rigoureusement protégé.</p>',
impactReglementaire: '<p> Pour les sites inscrits, les travaux modifiant l\'aspect du site, notamment les coupes ou les créations de desserte, doivent faire l\'objet d\'une déclaration préalable.</p><p> Pour les sites classés, les travaux modifiant l\'aspect du site, notamment les coupes ou les créations de desserte, doivent faire l\'objet d\'une autorisation spéciale.</p>',
impactProcedure: '<p>Pour les sites inscrits, une déclaration est à faire 4 mois au moins avant les travaux auprès de l\'unité départementale de l\'architecture et du patrimoine.</p><p> Pour les sites classés, il est recommandé de prendre contact au préalable avec l\'architecte des bâtiments de France pour faciliter la procédure.</p>',
referenceUrl: '',
contact: 'Pour les sites inscrits, Direction départementale des territoires. Pour les sites classés, UDAP du département'
}),
new Reglementation().deserialise({
thematicName: 'Patrimoine',
layerName: 'Espaces boisés classés',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ export class ThematicTabsComponent implements OnInit {
layer.features = this.responseFeatures.filter((feature) => {
if(this.parseLayerFromTechnicalName(layer.technicalName) === feature.layer) {
if((layer.title === 'Coeurs de parcs nationaux' && feature.zone != 'Coeur') ||
(layer.title === 'Zones d\'adhésion de parcs nationaux' && feature.zone != 'Adhesion')
(layer.title === 'Zones d\'adhésion de parcs nationaux' && feature.zone != 'Adhesion') ||
(layer.title === 'Monuments historiques' && feature.suptype != 'ac1') ||
(layer.title === 'Sites inscrits et classés' && feature.suptype != 'ac2')
) {
return false
}
Expand Down
28 changes: 26 additions & 2 deletions src/app/shared-thematic/models/map-thematic-layers.enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ export const MAP_PATRIMOINE_LAYER_GROUP = new LayerGroup({
},
layers: [
new TileLayer({
properties: THEMATIC_LIST.find((g) => g.name === 'patrimoine')?.layers?.find((l) => l.technicalName === 'wfs_sup:assiette_sup_s'),
properties: THEMATIC_LIST.find((g) => g.name === 'patrimoine')?.layers?.find((l) => l.technicalName === 'wfs_sup:assiette_sup_s' && l.title === 'Monuments historiques'),
extent: [
-20037508.342789244,
-44927335.42709704,
Expand All @@ -464,6 +464,30 @@ export const MAP_PATRIMOINE_LAYER_GROUP = new LayerGroup({
}
})
}),
new TileLayer({
properties: THEMATIC_LIST.find((g) => g.name === 'patrimoine')?.layers?.find((l) => l.technicalName === 'wfs_sup:assiette_sup_s' && l.title === 'Sites inscrits et classés'),
extent: [
-20037508.342789244,
-44927335.42709704,
20037508.342789244,
44927335.42709663
],
minZoom: 11.5,
minResolution: 0,
maxResolution: 156543.03392804097,
source: new TileWMS({
url: 'https://data.geopf.fr/wms-v/ows?',
projection: 'EPSG:3857',
attributions: [],
crossOrigin: 'anonymous',
params: {
'LAYERS': 'monument_naturel_site',
'FORMAT': 'image/png',
'VERSION': '1.3.0',
'cql_filter': "suptype = 'ac2'"
}
})
}),
new TileLayer({
properties: THEMATIC_LIST.find((g) => g.name === 'patrimoine')?.layers?.find((l) => l.technicalName === 'wfs_du:prescription_surf'),
extent: [
Expand All @@ -484,7 +508,7 @@ export const MAP_PATRIMOINE_LAYER_GROUP = new LayerGroup({
'LAYERS': 'prescription',
'FORMAT': 'image/png',
'VERSION': '1.3.0',
'cql_filter': "typepsc = '01' AND stypepsc IN ('00', 01, 02, 03)"
'cql_filter': "typepsc = '01' AND stypepsc IN ('00', '01', '02', '03')"
}
})
}),
Expand Down
5 changes: 5 additions & 0 deletions src/app/shared-thematic/models/thematic-list.enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ export const THEMATIC_LIST = [
group: 'patrimoine',
technicalName: 'wfs_sup:assiette_sup_s'
},
{
title: 'Sites inscrits et classés',
group: 'patrimoine',
technicalName: 'wfs_sup:assiette_sup_s'
},
{
title: 'Espaces boisés classés',
group: 'patrimoine',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export class ThematicFeatureService {
}

if (layer.title === 'Sites inscrits et classés') {
request.filterByAttribute('suptype', 'ac2');
request.filterByAttribute('suptype', 'ac2');
}

if(layer.title === 'Coeurs de parcs nationaux') {
Expand Down

0 comments on commit 423de47

Please sign in to comment.