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

Please add a parameter to the "fitZoom" and "fitExtent" functions to control whether the calculation result is "cover" or "contain". #2233

Open
IceSakuraAzure opened this issue Mar 21, 2024 · 1 comment

Comments

@IceSakuraAzure
Copy link

IceSakuraAzure commented Mar 21, 2024

maptalks's version and what browser you use?
1.0.0-rc.33 Edge/122.0.2365.92

Issue description
I was using the "fitZoom" function and realized that it only makes the short side of the container fit the map, similar to the css "object-fit:contain" in css. But now I need to make the map fill the whole screen, like the "object-fit:cover" in css, so I want to add a parameter to control the result of this function.

Please provide a reproduction URL (on any jsfiddle like site)

@fuzhenn
Copy link
Member

fuzhenn commented Mar 22, 2024

It makes sense, I will add a option for this.

We are migrating to typescript for now, will do this after the migration~

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

2 participants