nst-guide / web

Mapping website for National Scenic Trails

Home Page:https://nst.guide

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pass interactiveLayerIds directly to Mapbox GL

kylebarron opened this issue · comments

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.