I am trying to determine method of stying across a data range using 'get' expression and multiple criteria in Mapbox Studio using Mapbox Expressions. In the example below I want to style a marker matching symbol = 'Restaurant' AND title = 'Social Brewery and Kitchen'. Is this possible?

  ["get", "title", 'Social Kitchen and Brewery'],
  ["get", "marker-symbol", 'Restaurant'],
  "#000000" //fallback

1 Answer 1


Try concatenating the values:

    ["get", "title"],
    ["get", "marker-symbol"],
  "Social Kitchen and BreweryRestaurant",
  "#000000" //fallback

You may want to add a separaror with a second nested concat (or maybe expect a space character between values in the first place, I haven't tested).

  • Would have thought there would be a more conventional way but this works for me. Thanks! Jul 19, 2021 at 20:51
  • 1
    @wtgeographer it may seem this is an obvious feature. However, don't forget this is a client mapping framework; while there is nothing stopping it from offering more sophisticated relational data access (and Mapbox GL is already bursting with [more or less needed] functionality), I would not say that it should necessarily be used that way. Rather, IMO, pre-categorize and encode as much information as possible on the backend (and in DB), and transfer only the bare minimum of data to the client - think perfomance/bandwith, and security (i.e. obfuscating internal data structures).
    – geozelot
    Jul 20, 2021 at 8:19
  • Agreed! Thanks @geozelot Jul 21, 2021 at 19:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.