maplibre / maplibre-gl-js

MapLibre GL JS - Interactive vector tile maps in the browser
https://maplibre.org/maplibre-gl-js/docs/
Other
6.74k stars 726 forks source link

Cannot go from `vertical-perspective` to `globe` projection #5114

Open jonathanlurie opened 3 days ago

jonathanlurie commented 3 days ago

maplibre-gl-js version: 5.0.0-pre.7

browser: Chrome Version 130.0.6723.117 (Official Build) (arm64) (MacOS, M2)

Steps to Trigger Behavior

  1. map.setProjection({type: "vertical-perspective"})
  2. map.setProjection({type: "globe"})
  3. map.getProjection() still shows .type being "vertical-perspective" , instead of "globe"

Expected Behavior

After calling map.setProjection({type: "vertical-perspective"}) and then map.setProjection({type: "globe"}), we should get a .type value being "globe" when calling map.getProjection().

Actual Behavior

After calling map.setProjection({type: "vertical-perspective"}) and then map.setProjection({type: "globe"}), we still have a .type value of "vertical-perspective" when calling map.getProjection().

This means the animation is not possible from vertical-perspective directly to globe (where the animation should actually hardly show, since both are globe)

HarelM commented 3 days ago

This is currently planned to be solved as part of version 5. globe is not a projection, but a preset of vertical-perspective and mercator for different zoom levels.

Feel free to push this forward if you are eager to see this get it in. CC: @birkskyum