Report errors when parsing raster tiles
Use the same API/pattern for parsing raster tiles as we use for vector tiles. Forward the error as an exception that will ultimately reach the StillImageCallback. Also set the tile to State::obsolete on error like we do for vector tiles.
This commit is contained in:
@@ -25,8 +25,8 @@ bool Raster::isLoaded() const {
|
||||
return loaded;
|
||||
}
|
||||
|
||||
bool Raster::load(const std::string &data) {
|
||||
img = std::make_unique<util::Image>(data);
|
||||
bool Raster::load(std::unique_ptr<util::Image> image) {
|
||||
img = std::move(image);
|
||||
width = img->getWidth();
|
||||
height = img->getHeight();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user