Fix mode switch not working in node version #415
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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