mapbox / mapbox-gl-js

Interactive, thoroughly customizable maps in the browser, powered by vector tiles and WebGL
https://docs.mapbox.com/mapbox-gl-js/
Other
11.23k stars 2.23k forks source link

Sometimes clipped featuresAt response? #2125

Closed tristen closed 8 years ago

tristen commented 8 years ago

I'm noticing some weird behaviour collecting a large number of points at once by setting a high radius on map.featuresAt:

features-at-capture

The collected features are sometimes clipped sometimes not.

jfirebaugh commented 8 years ago

This is expected behavior: the way featuresAt works is it determines which tile the point is in, then queries features within that tile. The radius option is a way of fudging the rendered representation of features before we have #316. It's not intended to make featuresAt a general purpose circular query. If you want to find features within a circle, you'll need to use featuresIn and post-filtering.