mapbox / mapbox-gl-native

Interactive, thoroughly customizable maps in native Android, iOS, macOS, Node.js, and Qt applications, powered by vector tiles and OpenGL
https://mapbox.com/mobile
Other
4.34k stars 1.33k forks source link

Porting styling `text-color` with image fallback expressions #16628

Closed SnailBones closed 2 years ago

SnailBones commented 2 years ago

Issue to track porting of https://github.com/mapbox/mapbox-gl-js/pull/11049.

The following style needs to work in order to support beta shields with fallbacks:

'icon-image': [
  'case',
  ['has', 'shield_beta'],
  [
    'coalesce',
    ['image', ['concat', ['get', 'shield_beta'], '-', ['to-string', ['get', 'reflen']]]],
    ['image', ['concat', 'default-', ['to-string', ['get', 'reflen']]]]
  ],
  ['concat', ['get', 'shield'], '-', ['to-string', ['get', 'reflen']]]
]

cc @ClareTrainor

SnailBones commented 2 years ago

Closing in favor of https://github.com/mapbox/mapbox-gl-native-internal/issues/2573