Proposal: Remove ShumateMapSourceChain?
The map source chain system is pretty complicated, and it doesn't provide much benefit--there's only a couple useful configurations. So, I propose we remove it.
All of the current map sources can either be removed or used on their own:
- FileCache is only really useful with NetworkTileSource, so it might as well be part of NetworkTileSource.
- Or as a separate helper class that doesn't extend TileSource, so it can be reused in custom map sources.
- Errors can be handled by letting the application know so it can show a UI, rather than using a special tile source (ErrorTileSource).
- MemoryCache can be moved to the tile layer.
There are further issues that would or can be addressed by removing map source chains:
- Each tile source has its own, slightly different, code for decoding images. This duplication would be eliminated if there was only a NetworkTileSource.
- However, it's also worth considering whether the tile source should handle decoding at all, or whether that should be handled by the tile layer. Having the tile sources provide raw data only would make it easier to implement vector tiles in the future. Is that something worth planning for right now?
- MemoryCache caches image data, not GdkTextures, so the image is decoded again even on cache hits.