mapbox / mapbox/mapbox-maps-flutter
Zoom the map programmatically?
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 380
- Forks
- 204
- PR merge metrics
- No merged PRs in 30d
Description
I would like to create my own zoomIn() and zoomOut() buttons on a toolbar, but there does not seem to be an api call into MapboxMap for this. I tried
mapboxMap.scaleBy(15.0, ScreenCoordinate(x: 10.0, y: 10.0),
MapAnimationOptions(duration: 2000, startDelay: 0));
following the example provided in your codebase, but it produces PlatformException (PlatformException(0, Not available., null, null)) at line 1803 in your map_interfaces.dart file.
What is the right way to zoom the map programmatically?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the MapboxMap.scaleBy call and map_interfaces.dart at line 1803, then trace the platform implementation behind the reported “Not available” exception. Determine how programmatic zoom is intended to be exposed for toolbar controls, and verify that the documented or implemented path performs zooming without that exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100