mapbox-unity-sdk
mapbox-unity-sdk copied to clipboard
CameraBounds TileProvider vs. viewing angle: overflow issue
- Mapbox SDK version: 2.1.1
Feature: Camerabound Extent / TileProvider
Best Case (Camera 1): Camera Bound TileProvider is working nicely if you are facing straight downwards the y axis onto the map ("2D View"). This is not producing too many tiles to be loaded in any case. Worst case (Camera 2): In the case of an 3D game with flat camera viewing angles (looking to the horizon / infinity) this tileprovider fails due to an missing threshold like "max-loadable-extent". The provider is trying to load an huge amount of tiles to get all tiles possibly visible in the view-frustum of the camera. This will freeze the application for a long time or lead to an memory-overflow. Approach: Camera-Bound-Tileprovider should define an limit of maximum loadable tiles to avoid this scenario.
@Markovicho I added a very simple check for this in one of the latest commits (in performance branch). but that's not a proper solution for obvious reasons. I'm hoping that we'll switch to a proper quad tree solution at some point and that'll be the ultimate fix.
@brnkhy was this resolved? and how?
@TheBriefTeam It's not and it'll be a part of our medium/long term goal; switching to proper quad tree implementation. I'll definitely let you know when that happens as it'll probably be a big-ish change.