mapbox / mapbox-maps-flutter

Interactive, thoroughly customizable maps for Flutter powered by Mapbox Maps SDK
https://www.mapbox.com/mobile-maps-sdk
Other
285 stars 117 forks source link

SymbolLayer and FillLayer not showing with VectorTiles Style #674

Closed RAglx closed 2 months ago

RAglx commented 2 months ago

Dear Mapbox Flutter team,

if I set a vectortile layer with setStyleURI there are geometries missing in the map.

See the attached file with included geojson. style.zip It's the style.dart file from your example project. Just copy it to \example\lib and run the app. Choose Style interface and then switch through the styles by hitting the setStyleURI button.

You can see, that the polygons are rendered correctly with your Mapbox default styles. But they do disappear with the vectortiles. If you comment out the topicsLabels layer, everything works as expected.

I tried several options for the SymbolLayer, like textIgnorePlacement or textAllowOverlap but without effect.

Am I doing something wrong? Is there an option which I'm missing? Or is it a bug?

Greets and thanks

Mapbox 1 Mapbox 2 Vectortiles 1 Vectortiles 2
evil159 commented 2 months ago

Hi @RAglx, thank you for making the report! I was able to reproduce this issue and created a ticket to investigate this further: https://mapbox.atlassian.net/browse/MAPSNAT-2341.

endanke commented 2 months ago

@RAglx we looked at the example you provided, and it looks like that the issue is with the specification of the font. Because your style uses a custom glyph configuration, you need to specify the font in your custom symbol layers. We tried to set it to Frutiger Neue Regular which you use in your style and that fixes the rendering of the custom layers.

RAglx commented 2 months ago

Yes indeed! 🥳 Setting the font to Frutiger Neue Regular after setting the style to vectortiles solves the problem completely. Thank you very much for your answer.

PS: Interestingly, this also fixes an issue I had with other polygons when vectortiles were displayed: Before setting the font (somehow corrupted) Font set to Frutiger for vectortiles (solved)
Before setting the font Font set to Frutiger