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

Fix mode switch not working in node version #415

Merged
merged 1 commit into from
Aug 28, 2022

Conversation

acalcutt
Copy link
Collaborator

@acalcutt acalcutt commented Aug 27, 2022

This is a fix for the label clipping issue mentioned here #284

I decided to take a look at the node mappings again today, since in the linux tests I ran it seemed tile mode worked fine. I was looking before at the mode switch in node_map.cpp#L1403-L1409 , but today I realized that when the map was created the 'withMapMode' was set it was not using the 'mode' variable. Instead it was hardcoded to static tile mode 'mbgl::MapMode::Static' on L1424 and L645

Changing from a hardcoded 'mbgl::MapMode::Static' to using the 'mode' variable seems to have fixed the issue I was having with clipping, which make sense since the map was not being created in tile mode before.

After finding this I went and looked at the mapbox 5.0.2 release which was working and I found that version also used the 'mode; variable on L642 and L1449

This change has been tested in
@acalcutt/maplibre-gl-native 5.0.25
@acalcutt/tileserver-gl v4.0.21
maplibre-label-clipping-test

instead of being hardcoded to mbgl::MapMode::Static
@acalcutt
Copy link
Collaborator Author

It looks like this was changed in cfcbc62

@acalcutt acalcutt marked this pull request as ready for review August 28, 2022 00:13
@birkskyum
Copy link
Member

Great job investigating this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants