0

I'm using Mapbox Terrain vector tileset to show elevation contours on my map. But my region of interest is quite flat, so there aren't any visible contours in that area. (basically, I see contours all around my region, but not in the actual region I need the contours for.)

How do I modify the ele field of the contour layer to change the contour density? Thank you!

Mapbox Terrain-v2, #contour, ele field

1 Answers1

0

Based on the documentation, you have to use the exaggeration param, that will exaggerates the elevation of the terrain by multiplying the data from the DEM with this value

map.setTerrain({ 
  'source': 'mapbox-dem', 
  'exaggeration': 1.5 // x1.5 multiplier to exaggerate DEM data
}); 
jscastro
  • 3,422
  • 1
  • 9
  • 27
  • Thank you! I actually meant to ask about the mapbox **terrain-v2** (https://docs.mapbox.com/vector-tiles/reference/mapbox-terrain-v2/), not the 3D terrain elevation. I've put an image in my original post for clarification. Do you have a suggestion for how to edit the "ele" field? – fastturtle May 09 '21 at 16:26
  • Sorry, I misunderstood your question then – jscastro May 09 '21 at 18:55