Now that vector tiles can be downloaded and rendered, last week I made several tests to see how Marble deals with them and where the bottlenecks could be. Soon the (obvious) differences between managing image files and vector files (some of them up to 9MB size). Image tiles once downloaded are kept in memory all the time and that is impossible for vector tiles. So talking with some Marble experts they suggested creating a new layer that would have a new logic for vector tiles.
The code only supported one tiled layer so some changes have been made and now both layers work together. When writing these lines I thought about trying to use more than one texture layer and also a vector tile together because now all type of combinations are possible. Should I limit texture tiles just to one or this could bring more flexibility in order to create different maps?
Users could get confused and put together a tiled image layer and a static image layer which shouldn’t be made:
Coming back to the new logic, the plan now is to make VectorTileLayer save each vector tile’s latitude and longitude box and when the piece of map being displayed doesn’t contain that latlonbox or the map is in a different zoom level from the tile, remove it from memory.