visgl / react-map-gl

React friendly API wrapper around MapboxGL JS
http://visgl.github.io/react-map-gl/
Other
7.87k stars 1.36k forks source link

[Bug] Mapbox JS 2 Set terrain makes symbol layer and labels afloat at high pitch level #1775

Closed ShadowSonata closed 2 years ago

ShadowSonata commented 2 years ago

Description

I was expecting to use mapbox terrain dem to show elevation at high pitch and found out the base map labels and my symbol layers were both off. Tried with the native mapbox JS library and everything works fine.

Remove terrain props from Map will resolve this issue.

This is using react-map-gl@7.0 image

This is using native mapbox JS with a simple wrapper in React image

(* might not be too obvious but please compare the street names above, the first one has the labels floating in the air)

Expected Behavior

Labels should be on the ground

Steps to Reproduce

The one used with react-map-gl

https://codesandbox.io/s/react-map-gl-boiler-plate-forked-leu63d

The one used with native mapbox gl

https://codesandbox.io/s/react-map-gl-boiler-plate-forked-pb0z0w

Need a mapbox token, add it to line 7/6

Environment

Logs

No response

Pessimistress commented 2 years ago

Thanks for the report. Fixed in 7.0.8.