Skip to content

Commit

Permalink
fix: Use constant
Browse files Browse the repository at this point in the history
  • Loading branch information
josebui committed Apr 12, 2024
1 parent 1fdd9c8 commit a0a9c71
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/gis/components/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit a0a9c71

Please sign in to comment.