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

When updating the style with diff:true and terrain change the map doesn't change #3463

Closed
HarelM opened this issue Dec 9, 2023 · 2 comments · Fixed by #3515
Closed

When updating the style with diff:true and terrain change the map doesn't change #3463

HarelM opened this issue Dec 9, 2023 · 2 comments · Fixed by #3515
Labels
bug Something isn't working PR is more than welcomed Extra attention is needed Terrain 3D

Comments

@HarelM
Copy link
Member

HarelM commented Dec 9, 2023

There is a way to have the map look for changes in the style and apply them automatically, which is a great feature, but it doesn't take the terrain part of the spec into consideration.

Here's an example:
https://jsbin.com/muriqipaba/edit?html,output
When switching from diff: true to diff:false the 3D is removed, but it should also work for diff mode of update style.

Motivation:
I tried to add the terrain configuration to maputnik only to discover this doesn't work due to this issue.
Also maputnik doesn't use typescript, so upgrading to version 3/4 from the current version (2.4) will be a nightmare...

@HarelM HarelM added bug Something isn't working good first issue Good for newcomers PR is more than welcomed Extra attention is needed Terrain 3D labels Dec 9, 2023
@neodescis
Copy link
Collaborator

neodescis commented Dec 27, 2023

A workaround is to call setTerrain instead, but it would be great to have this fixed. The default for diff is true if not specified.

@HarelM HarelM removed the good first issue Good for newcomers label Dec 27, 2023
@HarelM
Copy link
Member Author

HarelM commented Dec 27, 2023

This requires a change in both spec package and here apparently.
But the fix is pretty simple.
I'll change how the diff operations are applied while on it, to improve readability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working PR is more than welcomed Extra attention is needed Terrain 3D
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants