mirror of
https://github.com/zvx-echo6/navi.git
synced 2026-05-20 22:54:42 +02:00
fix: Hide background layer in satellite mode
The background layer type was not being hidden, causing it to cover the satellite imagery. Now hideVectorFills hides fill, fill-extrusion, AND background layer types. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
e786bb8870
commit
4c1921d116
1 changed files with 2 additions and 2 deletions
|
|
@ -1334,9 +1334,9 @@ function hideVectorFills(map) {
|
||||||
if (!style || !style.layers) return
|
if (!style || !style.layers) return
|
||||||
|
|
||||||
for (const layer of style.layers) {
|
for (const layer of style.layers) {
|
||||||
// Hide fill layers (land, water, parks, buildings, etc.)
|
// Hide fill and background layers (land, water, parks, buildings, etc.)
|
||||||
// But keep line, symbol, and circle layers
|
// But keep line, symbol, and circle layers
|
||||||
if (layer.type === 'fill' || layer.type === 'fill-extrusion') {
|
if (layer.type === 'fill' || layer.type === 'fill-extrusion' || layer.type === 'background') {
|
||||||
// Don't hide our own overlay fills (public lands, etc)
|
// Don't hide our own overlay fills (public lands, etc)
|
||||||
if (layer.id.startsWith('public-lands') ||
|
if (layer.id.startsWith('public-lands') ||
|
||||||
layer.id.startsWith('boundary') ||
|
layer.id.startsWith('boundary') ||
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue