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

minimal zoom level incorrect for small map size #8778

Closed
Akiyamka opened this issue Sep 19, 2019 · 2 comments
Closed

minimal zoom level incorrect for small map size #8778

Akiyamka opened this issue Sep 19, 2019 · 2 comments

Comments

@Akiyamka
Copy link

Akiyamka commented Sep 19, 2019

Hello!
According to glossary zoom level = 0 must show whole earth.
But it doesn't work for map with width and height < 512px.
Example:
https://js-muk3zs.stackblitz.io

Why it's important
Small map canvas need for minimap feature.
This is a useful thing if we want to show on the map which part of the world the map is currently pointing to. Example
http://aesqe.github.io/mapboxgl-minimap/

mapbox-gl-js version:
1.3.1

Expected Behavior

zoom === 0 must show world event on small maps

Actual Behavior

zoom 0 show world only if map size more that 512px

@Akiyamka
Copy link
Author

Workaround

#map {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 512px;
  height: 512px;
  transform: scale(.3);
  transform-origin: top left;
}

https://js-d9aysl.stackblitz.io/

@ryanhamley
Copy link
Contributor

Hi @Akiyamka thanks for the report. This is a known issue that is being tracked in #3055 so I will close this as a duplicate issue.

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