mapbox / mapbox-gl-native

Interactive, thoroughly customizable maps in native Android, iOS, macOS, Node.js, and Qt applications, powered by vector tiles and OpenGL
https://mapbox.com/mobile
Other
4.36k stars 1.33k forks source link

[core][tile mode] Make sure only a single tile is used #16425

Closed pozdnyakov closed 4 years ago

pozdnyakov commented 4 years ago

In tile mode, we're supposed to have only one tile, which is achieved with provided camera options.

However, if camera options are not accurate enough more tile could be used, which could cause:

Now, if mbgl::tileCover() returns several tiles, only the first one is used (given that tiles are sorted by the distance to the camera center)