[glfw] allow loading mapbox:// style URLs via CLI
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user