diff options
Diffstat (limited to 'bin/render.cpp')
-rw-r--r-- | bin/render.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/render.cpp b/bin/render.cpp index 4902d09305..33e216f52a 100644 --- a/bin/render.cpp +++ b/bin/render.cpp @@ -39,6 +39,7 @@ int main(int argc, char *argv[]) { std::string cache_file = "cache.sqlite"; std::vector<std::string> classes; std::string token; + bool debug = false; po::options_description desc("Allowed options"); desc.add_options() @@ -51,6 +52,7 @@ int main(int argc, char *argv[]) { ("height,h", po::value(&height)->value_name("pixels")->default_value(height), "Image height") ("class,c", po::value(&classes)->value_name("name"), "Class name") ("token,t", po::value(&token)->value_name("key")->default_value(token), "Mapbox access token") + ("debug", po::bool_switch(&debug)->default_value(debug), "Debug mode") ("output,o", po::value(&output)->value_name("file")->default_value(output), "Output file name") ("cache,d", po::value(&cache_file)->value_name("file")->default_value(cache_file), "Cache database file name") ; @@ -94,6 +96,10 @@ int main(int argc, char *argv[]) { map.setLatLngZoom({ lat, lon }, zoom); map.setBearing(bearing); + if (debug) { + map.setDebug(debug); + } + uv_async_t *async = new uv_async_t; uv_async_init(uv_default_loop(), async, [](uv_async_t *as, int) { std::unique_ptr<const StillImage> image(reinterpret_cast<const StillImage *>(as->data)); |