cdubbs
cdubbs

Reputation: 93

Mapbox GL - Min/Max elevation in map bounds

Does anyone know if there is a way to determine the min/max elevation of the area within the map bounds view when using mapbox://mapbox.mapbox-terrain-v2?

Upvotes: 0

Views: 594

Answers (1)

kmandov
kmandov

Reputation: 3209

You can use the Surface API to find the elevation at a given location.

A possible approach would be to retrieve the elevation for a couple of points within the boundary and determine the min/max elevation approximately. The current limit of points per query is 300.

Take a look at the Surface Playground To get the elevation: Select the Mapbox Terrain from the examples, then layer: contour, field: ele

Upvotes: 2

Related Questions