Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

183
Views
How to apply a setFilter on feature property array with Mapbox

I have a map object with geojson data as source. each features is like :

{
    "id": "0",
    "type": "Feature",
    "properties": {
        "color": "#377eb8",
        "edge_id": 1,
        "time": [6, 7, 8]
        "speed_out": [50, 48, 46]
    },
    "geometry": {
        "type": "Polygon",
        "coordinates": [....]
    }
}

speed_out property is an array. It's the speed recorded at eah following time: 6AM, 7AM and 8AM.

I would like to apply setFilter in speed_out to change my layer's filter property whenever the input event fires (for example at 6 or 7 or 8).

I try this without succes.

map.setFilter('lines', ['==', ['number', ['get', 'speed_out']], time]);

Could you please helpe me

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!