title: Mapbox GL JS change builidng color on click
body: <p>i have to change the color or borders of buildings on click.</p>
  
  <p>HTML &amp; JS</p>
  
  <p>Like the examples to hover countries, but with click and not countries -> buildings.</p>
  
  <p>If it's easier with another plugin, please say so. 3D is not a 'must have'.</p>
  
  <p>My Code:</p>
  
  <pre><code>&lt;script&gt;
  mapboxgl.accessToken = 'hidden';
  var map = new mapboxgl.Map({
      style: 'mapbox://styles/mapbox/light-v9',
      center: [7.3337859, 50.8403206],
      zoom: 19.8,
      pitch: 60,
      bearing: -70,
      hash: true,
      container: 'map'
  });
  
  // The 'building' layer in the mapbox-streets vector source contains building-height
  // data from OpenStreetMap.
  map.on('load', function() {
      // Insert the layer beneath any symbol layer.
      var layers = map.getStyle().layers;
  
      var labelLayerId;
      for (var i = 0; i &lt; layers.length; i++) {
          if (layers[i].type === 'symbol' &amp;&amp; layers[i].layout['text-field']) {
              labelLayerId = layers[i].id;
              break;
          }
      }
  
      map.addLayer({
          'id': '3d-buildings',
          'source': 'composite',
          'source-layer': 'building',
          'filter': ['==', 'extrude', 'true'],
          'type': 'fill-extrusion',
          'minzoom': 15,
          'paint': {
              'fill-extrusion-color': '#aaa',
  
              // use an 'interpolate' expression to add a smooth transition effect to the
              // buildings as the user zooms in
              'fill-extrusion-height': [
                  "interpolate", ["linear"], ["zoom"],
                  15, 0,
                  15.05, ["get", "height"]
              ],
              'fill-extrusion-base': [
                  "interpolate", ["linear"], ["zoom"],
                  15, 0,
                  15.05, ["get", "min_height"]
              ],
              'fill-extrusion-opacity': .6
          }
      }, labelLayerId);
  
      map.on('click', '3d-buildings', function(e) {
          console.log(e.features[0]);
          //map.setPaintProperty('3d-buildings', 'fill-extrude-color', '#FF0000');
          map.setPaintProperty('3d-buildings', 'fill-color', '#faafee');
      });
  });
  </code></pre>
  
  <p>Thanks :)</p>