memphis_renderer_draw_tile() needs to inform the user if it cannot render a tile
|Reported by:||Jiri Techet||Owned by:||marius|
In libchamplain, I've implemented a new mechanism for loading tiles. Basically, there is a chain of map sources and if one map source cannot render a tile, the next map source in the chain is used for its rendering and so on. So for instance
cache -> network_source -> error_tile_source
first tries to get the tile from the cache, if it fails it tries to get it from the network and if that fails, it loads an arror tile.
This however isn't possible with MemphisMapSource? because this function:
void memphis_renderer_draw_tile (MemphisRenderer? *r,
cannot tell if it could render the tile successfully - even if Memphis doesn't have data for the given area, it "successfully" creates a tile with background color. What I would need is e.g. a gboolean return value that indicates when for the given area there is no map info and nothing can be rendered for the given tile. I imagine that some flag, initially set to FALSE could be used and once you draw something into the tile, it would be set to TRUE. But I haven't checked the sources so maybe there is a better way to do this.