Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to fit multiple coordinates within the map with zoom #854

Open
EmmanyTigaVentures opened this issue Feb 2, 2025 · 3 comments
Open

Comments

@EmmanyTigaVentures
Copy link

Hi guys,

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

Image

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

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.

@tchengck
Copy link

tchengck commented Feb 4, 2025

Hi, did you try the cameraForCoordinateBounds method? I think you were looking for this method.

Image

@TheinvinciblePrints
Copy link

Hi, did you try the cameraForCoordinateBounds method? I think you were looking for this method.

Image

Yeah it tried this but this only accepts 2 points southwest and northwest. In my case i can have more than 2 points.

@tchengck
Copy link

tchengck commented Feb 4, 2025

Then, you just need to determine the both points in advance. Like this (I haven't test it):

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants