Skip to content

Commit

Permalink
couleurs differentes pour pred
Browse files Browse the repository at this point in the history
  • Loading branch information
clement2323 committed Oct 24, 2024
1 parent 47a161d commit aecd05e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/departement/[departement].md
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,17 @@ const baseLayers = {
```

```js
// Assuming statistics, map, availableYears, name, quantileProbs, and colorScales are already defined
const overlays = {};
const styleName = "contour_rouge"; // Defined in GeoServer

// Adding layers for available years
for (const year of availableYears) {
const styleNames = ["contour_rouge","contour_bleu"]

availableYears.forEach((year, index) => {
const pleiadesLayer = getWMSTileLayer(`${name}_${year}`);
overlays[`PLEIADES ${year}`] = pleiadesLayer;

const predictionLayer = getWMSTileLayer(`${name}_PREDICTIONS_${year}`, styleName);
const predictionLayer = getWMSTileLayer(`${name}_PREDICTIONS_${year}`, styleNames[index]);
overlays[`Prédiction ${year}`] = predictionLayer;
}

});
// Labels and indicators with associated units
const labels = [
{ indicator: 'pct_building_2023', label: 'Pourcentage de bâti 2023', colorScale: 'redScale', unit: '%' },
Expand All @@ -131,6 +129,8 @@ const labels = [
{ indicator: 'area_building_change_relative', label: 'Variation de Surface relative', colorScale: 'yellowScale', unit: '%' }
];

// Assuming statistics, map, availableYears, name, quantileProbs, and colorScales are already defined

// Create and add GeoJSON layers
let isFirstLayer = true;
for (const { indicator, label, colorScale, unit } of labels) {
Expand Down

0 comments on commit aecd05e

Please sign in to comment.