By Anton


2019-10-09 14:53:59 8 Comments

Here is my code:

'fill-color': {
    property: 'date',
    stops: [
        ['1920-12-31', '#faa476'],
        ['1940-12-31', '#f0746e'],
        ['1960-12-31', '#e34f6f'],
        ['1980-12-31', '#dc3977'],
        ['2000-12-31', '#b9257a'],
        ['2020-12-31', '#7c1d6f']
    ]
},

Date property contains dates in format YYYY-MM-DD, but map doesn't work. Could anybody say what am I doing wrong?

0 comments

Related Questions

Sponsored Content

29 Answered Questions

[SOLVED] Get month name from Date

1 Answered Questions

mapbox map layer control with javascript

1 Answered Questions

How to add filters to Mapbox Map?

1 Answered Questions

1 Answered Questions

circle-color by date in mapbox gl js ?

  • 2018-06-25 15:49:18
  • Monsieurxu
  • 234 View
  • 0 Score
  • 1 Answer
  • Tags:   mapbox-gl-js

1 Answered Questions

[SOLVED] mapbox layer fill-color based on TEXT property

1 Answered Questions

[SOLVED] Large GeoJSON not working w/ MapBox GL

2 Answered Questions

Sponsored Content