title: How get features from a style's layer in Mapbox GL JS?
body: <p>I'm a learner of JavaScript and have a problem with Mapbox GL JS: I have a style in Mapbox Studio, where there is <a href="https://i.stack.imgur.com/0MkFF.png" rel="nofollow noreferrer">one my layer — "locations"</a>. I've added it as a tileset. There are two GeoJSON-points in this layer, but I can't get them in GL JS.
  I've found that I should use method <code>querySourceFeatures(sourceID, [parameters])</code>, but I have problems with correct filling its parameters. I wrote:</p>
  
  <pre><code>var allFeatures = map.querySourceFeatures('_id-of-my-tyleset_', {
    'sourceLayer': 'locations'
  });
  </code></pre>
  
  <p>..and it doesn't work.</p>
  
  <p>More interesting, that later in the code I use this layer with method <code>queryRenderedFeatures</code>, and it's okay:</p>
  
  <pre><code>map.on('click', function(e) {
        var features = map.queryRenderedFeatures(e.point, {
          layers: ['locations']
        });
  
        if (!features.length) {
          return;
        }
        var feature = features[0];
        flyToPoint(feature);
        var popup = new mapboxgl.Popup({
            offset: [0, -15]
          })
          .setLngLat(feature.geometry.coordinates)
          .setHTML('&lt;h3&gt;' + feature.properties.name + '&lt;/h3&gt;' + '&lt;p&gt;' +
            feature.properties.description + '&lt;/p&gt;')
          .addTo(map);
      });
  </code></pre>
  
  <p>I have read a lot about adding layers on a map and know that the answer is easy, but I can't realise the solution, so help, please :)</p>
  
  <p><a href="https://github.com/nikita-nikiforov/bilhorod-map/blob/master/index.html" rel="nofollow noreferrer">Here is</a> the project on GitHub.</p>