mapbox / mapbox/mapbox-maps-flutter

How to fit multiple coordinates within the map with zoom

Open
#854 3 comments 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

Hi guys,

I really need help fitting all the Points (that has Positions) inside the Mapwidget.

![Image](https://github.com/user-attachments/assets/bd810b5c-1263-4d97-85db-5b744bfd98af)

I tried this too but setting padding of 140 is too much and although its working but sometimes when i have different Points, they tend to not fit inside the map

![Image](https://github.com/user-attachments/assets/b4417b76-001f-4f86-99c1-53ec89fd7f39)

This is what i have done so far but its not working.

The image below is what is expected

Image

I've been on this for days and still can't figure it out.

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

No repository file or test is named. Start by reproducing the map with the varying point positions shown in the issue and compare the current fixed padding of 140 with the expected image. Done should mean all points remain visible inside the MapWidget without relying on a padding value that fails for different point sets.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.