shahrooz bazrafshan
shahrooz bazrafshan

Reputation: 688

mapbox gl circle-color with gradient bg color

i want to have a circle-color property on mapbox gl that have variable radius that have linear gradient color from red in center to white on the edge: something like this:

map.addLayer({
...
paint:{
        'circle-color': [
          'red',
          'white',
        ],
        'circle-radius': {
          property: 'point_count',
          stops: [
            [0, 10],
            [1, 15],
            [3, 20],
            [4, 25],
            [5, 30],
            [6, 35],
            [7, 40],
            [8, 45],
            [9, 50],
          ],
          default: 60,
          base: 1,
          type: 'exponential'
        }
}
})

how can i do that?

Upvotes: 0

Views: 518

Answers (1)

Steve Bennett
Steve Bennett

Reputation: 126215

Mapbox GL JS does not support fill gradients.

Upvotes: 0

Related Questions