mapbox / mapbox-gl-js

Interactive, thoroughly customizable maps in the browser, powered by vector tiles and WebGL
https://docs.mapbox.com/mapbox-gl-js/
Other
11.11k stars 2.21k forks source link

Flat view for 3D is disabled for added building and model layer #13081

Open WataruTsuchida opened 7 months ago

WataruTsuchida commented 7 months ago

When using the standard style, it works automatically by changing pitch, but it is not affecting dynamically added building and model layers.

underoot commented 7 months ago

Could you provide video/code example of what you mean?

astojilj commented 7 months ago

dynamically added building and model layers

@WataruTsuchida Do you mean that custom layer using Three.js is not correctly rendered, or model layer added using this approach?

If you have a custom layer and issues with orthographic camera projection, would this work around the issue?

map.setCamera({"camera-projection": "perspective"})

WataruTsuchida commented 7 months ago

Appears that react-map-gl has odd behaviour with v3, setCamera({"camera-projection": "orthographc"}) before we talk about this issue.

Let me check....

WataruTsuchida commented 7 months ago

In my codes, pitch 0 does not enable flat view. https://github.com/mapbox/mapbox-gl-js/assets/81536433/e2418d88-b17a-4e4f-bf14-21c08c180f2d

I want this effect. https://github.com/mapbox/mapbox-gl-js/assets/81536433/cf93c51a-60be-4275-bd15-eb2059e65a97

jamesedmonston commented 4 months ago

@WataruTsuchida did you manage to find a fix for this? I'm running in to the same issue where I'm unable to get the map to lay flat like it is in the studio editor.