Skip to content

Commit

Permalink
homogenize opacity of layers
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickbr committed Sep 25, 2024
1 parent d50e65c commit a066bdf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion web/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ function loadMap(id, bounds, numObjects, autoThreshold) {
const objectsLayer = L.nonTiledLayer.wms('heatmap', {
minZoom: 0,
maxZoom: 19,
opacity: 0.9,
layers: id,
styles: ["objects"],
format: 'image/png'
Expand All @@ -167,7 +168,7 @@ function loadMap(id, bounds, numObjects, autoThreshold) {
const autoHeatmapLayer = L.nonTiledLayer.wms('heatmap', {
minZoom: 0,
maxZoom: 15,
opacity: 0.8,
opacity: numObjects > autoThreshold ? 0.8 : 0.9,
layers: id,
styles: numObjects > autoThreshold ? ["heatmap"] : ["objects"],
format: 'image/png',
Expand All @@ -177,6 +178,7 @@ function loadMap(id, bounds, numObjects, autoThreshold) {
const autoObjectLayer = L.nonTiledLayer.wms('heatmap', {
minZoom: 16,
maxZoom: 19,
opacity: 0.9,
layers: id,
styles: ["objects"],
format: 'image/png'
Expand Down

0 comments on commit a066bdf

Please sign in to comment.