summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-05-12 16:16:16 +0200
committerKonstantin Käfer <mail@kkaefer.com>2015-05-13 10:39:22 +0200
commit3ec48b10300e3fdd56851e80f830423123a106d4 (patch)
tree0dd10a28953cbe785d0adb4d89b83f5af4d1f560 /bin
parent42b626ea1e216160435a969b55d135454ff35718 (diff)
downloadqtlocation-mapboxgl-3ec48b10300e3fdd56851e80f830423123a106d4.tar.gz
allow passing --debug to view tile boundaries in mbgl-render
Diffstat (limited to 'bin')
-rw-r--r--bin/render.cpp6
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));