-
James Westman authored
Split the network source into separate classes for fetching data, rendering raster tiles, and rendering vector tiles. This makes the code much more modular and organized, especially since vector tiles are about to get even more complicated. ShumateDataSource is a new abstract class that retrieves tile data. It has a built-in implementation, ShumateTileDownloader, which takes over the network part of ShumateNetworkTileSource. ShumateRasterRenderer is a ShumateMapSource that provides tiles by reading image files from a ShumateDataSource. Similarly, ShumateVectorRenderer is a ShumateMapSource that provides tiles by rendering vector tiles. This commit also modifies the network source to use the tile URL as a file cache key, rather than the map source ID. This is because, with vector tiles, two different map sources may use the same set of tiles.