summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2015-05-19 01:13:46 +0300
committerThiago Marcos P. Santos <thiago@mapbox.com>2015-05-22 10:44:18 +0300
commitda81211feaffd89319330774b61b261b939dde33 (patch)
tree18a26cabee3d486f7684590c7b9d981c39661f4f /include
parentb304b20073556d442764696dbe5ac09d5462ada0 (diff)
downloadqtlocation-mapboxgl-da81211feaffd89319330774b61b261b939dde33.tar.gz
Add callback for error notifications on renderStill()
The callback will be called when any of the resources requested from the network failed to load. There is not recovery implemented yet, so the closest thing to reseting the Map object and reloading all the resources would be setting a new style.
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/map/map.hpp2
-rw-r--r--include/mbgl/platform/event.hpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp
index e71c5f5b4d..a6aac08b3c 100644
--- a/include/mbgl/map/map.hpp
+++ b/include/mbgl/map/map.hpp
@@ -42,7 +42,7 @@ public:
// Register a callback that will get called (on the render thread) when all resources have
// been loaded and a complete render occurs.
- using StillImageCallback = std::function<void(std::unique_ptr<const StillImage>)>;
+ using StillImageCallback = std::function<void(std::exception_ptr, std::unique_ptr<const StillImage>)>;
void renderStill(StillImageCallback callback);
// Triggers a synchronous or asynchronous render.
diff --git a/include/mbgl/platform/event.hpp b/include/mbgl/platform/event.hpp
index 5fd64119cc..8cdd1d50a9 100644
--- a/include/mbgl/platform/event.hpp
+++ b/include/mbgl/platform/event.hpp
@@ -29,6 +29,7 @@ enum class Event : uint8_t {
ParseStyle,
ParseTile,
Render,
+ ResourceLoader,
Database,
HttpRequest,
Sprite,
@@ -46,6 +47,7 @@ MBGL_DEFINE_ENUM_CLASS(EventClass, Event, {
{ Event::ParseStyle, "ParseStyle" },
{ Event::ParseTile, "ParseTile" },
{ Event::Render, "Render" },
+ { Event::ResourceLoader, "ResourceLoader" },
{ Event::Database, "Database" },
{ Event::HttpRequest, "HttpRequest" },
{ Event::Sprite, "Sprite" },