diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2017-09-18 17:45:44 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2017-09-18 17:45:44 +0200 |
commit | c6e11581ffd5dd8bad62b63df2475e1d231f9a5a (patch) | |
tree | 0b0a1172cc39423effd27caeaa561c06e5acc76e | |
parent | 00dde25022840a86bfbdeea77c9f1824c10134d3 (diff) | |
download | qtlocation-mapboxgl-upstream/glfw-mapbox-urls.tar.gz |
[glfw] allow loading mapbox:// style URLs via CLIupstream/glfw-mapbox-urls
-rw-r--r-- | platform/glfw/main.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/glfw/main.cpp b/platform/glfw/main.cpp index 3702b8aaab..997831cb77 100644 --- a/platform/glfw/main.cpp +++ b/platform/glfw/main.cpp @@ -66,7 +66,7 @@ int main(int argc, char *argv[]) { benchmark = true; break; case 's': - style = std::string("asset://") + std::string(optarg); + style = std::string(optarg); break; case 'x': longitude = atof(optarg); @@ -124,6 +124,10 @@ int main(int argc, char *argv[]) { backend.setMap(&map); + if (style.find("://") == std::string::npos) { + style = std::string("file://") + style; + } + // Load settings mbgl::Settings_JSON settings; |