From a0a9c719357f8105916985ed0c092553bcde41dc Mon Sep 17 00:00:00 2001 From: Jose Buitron Date: Fri, 12 Apr 2024 15:07:20 -0500 Subject: [PATCH] fix: Use constant --- src/gis/components/Map.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gis/components/Map.js b/src/gis/components/Map.js index 646c57c594..0150f4ed47 100644 --- a/src/gis/components/Map.js +++ b/src/gis/components/Map.js @@ -33,6 +33,8 @@ import { mapboxgl.accessToken = MAPBOX_ACCESS_TOKEN; +const TERRAIN_EXAGGERATION = 1; + export const MAPBOX_DEM_SOURCE = { type: 'raster-dem', url: 'mapbox://mapbox.mapbox-terrain-dem-v1', @@ -303,7 +305,10 @@ const Map = props => { map.addSource('mapbox-dem', MAPBOX_DEM_SOURCE); // add the DEM (Digital Elevation Model) source as a terrain layer with exaggerated height - map.setTerrain({ source: 'mapbox-dem', exaggeration: 1.5 }); + map.setTerrain({ + source: 'mapbox-dem', + exaggeration: TERRAIN_EXAGGERATION, + }); } if (disableElevation) {