You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With certain map styles (or if an application supports switching map style) it can be difficult (or impossible) to select a text color that provides good contrast against all areas of the map. A simple workaround can be to render (for example) with a dark font color and a thin light color outline.
fontSettings: {sdf: true} is required to use this feature.
Closing this issue to consolidate with #4579. If you have any feedback regarding this feature before the 8.5 release, feel free to discuss it in the master feature request thread.
Target Use case
With certain map styles (or if an application supports switching map style) it can be difficult (or impossible) to select a text color that provides good contrast against all areas of the map. A simple workaround can be to render (for example) with a dark font color and a thin light color outline.
Proposed feature
Similar to PolygonLayer supporting filled/stroked props and corresponding color accessor functions, add those same props to TextLayer. For SDF fonts this can be implemented by using a different shader - see e.g. https://stackoverflow.com/questions/26155614/outlining-a-font-with-a-shader-and-using-distance-field
It would be fine if support is dependent on
fontSettings.sdf=true
.To Do List
The text was updated successfully, but these errors were encountered: