You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: