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

Can't zoom out enough to show full earth in a small window #7804

Closed
jpilet opened this issue Jan 23, 2019 · 1 comment
Closed

Can't zoom out enough to show full earth in a small window #7804

jpilet opened this issue Jan 23, 2019 · 1 comment

Comments

@jpilet
Copy link

jpilet commented Jan 23, 2019

Motivation

I want to show a map of the earth in a relatively small window, let's say 400x400.
However, negative zoom are not supported, so at the minimum zoom 0, the world is not completely visible (because tileSize is larger than 400).

To reproduce:

Design Alternatives

Option 1: do not support zooming out beyond level 0.

Option 2: support negative zooms.

Option 3: add an API to change tileSize

Design

For the negative zoom:

A zoom of -1 would mean: show zoom level 0 at half its size.

For the API consumer, there's no significant change.

For designers, they would have to deal with the current implicit minZoom: 0 for all layers.

Changing tileSize

instead of dealing with negative zoom, the user could divide tileSize by 2, thus resulting in a much denser map. This option would give the user some control over the density of displayed information, too.

Concepts

How will we teach negative zooms ?
By explaining that level -1 corresponds to a world map rendered at half the size of similar map of level 0.

Implementation

For negative zooms:
The code would not be very hard to write. Remove assert(z >= 0), and make sure all the math makes sense.

@andrewharvey
Copy link
Collaborator

hey @jpilet I'll go ahead and close this issue as a duplicate of #3055 to avoid fragmentation. Please add your comments to #3055.

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