nst-guide / web

Mapping website for National Scenic Trails
https://nst.guide
GNU General Public License v3.0
5 stars 0 forks source link

Pass interactiveLayerIds directly to Mapbox GL #45

Open kylebarron opened 4 years ago

kylebarron commented 4 years ago

I.e.:

    const features = this.map.queryRenderedFeatures(
      [
        [x - pickingRadius, y - pickingRadius],
        [x + pickingRadius, y + pickingRadius]
      ],
      { layers: interactiveLayerIds }
    );

Should be faster than checking all layers, and then filtering.