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

[Bug] terrain prop does not reset to no-terrain when set to undefined #2490

Open
Fabioni opened this issue Feb 7, 2025 · 0 comments
Open
Labels

Comments

@Fabioni
Copy link

Fabioni commented Feb 7, 2025

Description

Once terrain is enabled by something like terrain={source: 'terrain-dem', exaggeration: 1.5}; you can not disable it again by setting it to undefined. Setting is to null does work but throws a typescript error.

Expected Behavior

Typescript says terrain is terrain | undefined, so setting to undefined should disable terrain in maplibre.

Steps to Reproduce

Toggle terrain setting between terrain and undefined.

Environment

  • Framework version: 4.7.1 or 5.1.0
  • Browser: Chrome
  • OS: Mac

Logs

No response

@Fabioni Fabioni added the bug label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant