mapbox / mapbox/mapbox-maps-flutter

[Feature Request] expose standalone getElevation function

Open
#213 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dart
Stars
380
Forks
204
PR merge metrics
No merged PRs in 30d

Description

Currently the elevation of a coordinate can be retrieved using MapboxMap.getElevation. However the caller must make sure that the given coordinate is within the visible region of the map and terrain is enabled.

It would be nice to have a separate function that uses the tile store/ cache to get the DEM tile or requests it if necessary and then extract the elevation from this tile.
This way it is no longer necessary to keep an instance of MapboxMap around for which the camera has to be adjusted every time the elevation of a given coordinate is needed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at MapboxMap.getElevation and trace how the tile store or cache obtains DEM tiles and extracts elevation. A standalone function should retrieve or request the needed tile and return the coordinate's elevation without requiring a MapboxMap instance or camera adjustment.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
api, mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.