mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-08-31 23:53:25 +00:00
only set terrain when pitch > 0
This commit is contained in:
@@ -169,10 +169,12 @@
|
|||||||
tileSize: 512,
|
tileSize: 512,
|
||||||
maxzoom: 14
|
maxzoom: 14
|
||||||
});
|
});
|
||||||
newMap.setTerrain({
|
if (newMap.getPitch() > 0) {
|
||||||
source: 'mapbox-dem',
|
newMap.setTerrain({
|
||||||
exaggeration: newMap.getPitch() > 0 ? 1 : 0
|
source: 'mapbox-dem',
|
||||||
});
|
exaggeration: 1
|
||||||
|
});
|
||||||
|
}
|
||||||
newMap.setFog({
|
newMap.setFog({
|
||||||
color: 'rgb(186, 210, 235)',
|
color: 'rgb(186, 210, 235)',
|
||||||
'high-color': 'rgb(36, 92, 223)',
|
'high-color': 'rgb(36, 92, 223)',
|
||||||
@@ -186,10 +188,7 @@
|
|||||||
exaggeration: 1
|
exaggeration: 1
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
newMap.setTerrain({
|
newMap.setTerrain(null);
|
||||||
source: 'mapbox-dem',
|
|
||||||
exaggeration: 0
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user