Search code examples
labelmapboxtilemill

Mapbox Studio: Make a text-name entry with infos from different columns


I have map box studio 0.2.7 for mac. I need to make a label combining infos from 2 different columns, for example the Name and the Tel Number of a vendor.

This is my code so far:

#Vendors{
  line-width: 1;
  line-color: rgba(0, 0, 0, 0.5);
  polygon-fill: #ffff00; 
  text-name: "[VendorName]";
  text-face-name: 'Arial Unicode MS Regular';
  //text-name:[TEL_Local];
}

Setting text-name again will overwrite the old entry, so I was wondering if there is something like this:

text-name: "[VendorName] & [TEL_Local]";

or

text-name: "[VendorName + TEL_Local]";

Both don't work, but You get the idea of what I need. How can I do this?

thanks


Solution

  • Have you tried:

    text-name: [VendorName] + [TEL_Local];
    

    This works for me in Mapbox Studio: enter image description here