summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2018-12-18 17:26:31 -0800
committerChris Loer <chris.loer@mapbox.com>2018-12-21 15:13:48 -0800
commit990e3874f47a566586a8ea4e56d1e3c5057471d8 (patch)
treeb398862ffb94fd12115e403a7d2ae4dc6db730b1 /bin
parentb7e2b11a75fd1b12d0ff948b9602fcd3db3779cf (diff)
downloadqtlocation-mapboxgl-990e3874f47a566586a8ea4e56d1e3c5057471d8.tar.gz
[core] Expose "includeIdeographs" in offline download command line tool.
Diffstat (limited to 'bin')
-rw-r--r--bin/offline.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/offline.cpp b/bin/offline.cpp
index 398f8427ee..e5ce1f75fe 100644
--- a/bin/offline.cpp
+++ b/bin/offline.cpp
@@ -101,6 +101,7 @@ int main(int argc, char *argv[]) {
args::ValueFlag<double> minZoomValue(argumentParser, "number", "Min zoom level", {"minZoom"});
args::ValueFlag<double> maxZoomValue(argumentParser, "number", "Max zoom level", {"maxZoom"});
args::ValueFlag<double> pixelRatioValue(argumentParser, "number", "Pixel ratio", {"pixelRatio"});
+ args::ValueFlag<bool> includeIdeographsValue(argumentParser, "boolean", "Include CJK glyphs", {"includeIdeographs"});
try {
argumentParser.ParseCLI(argc, argv);
@@ -127,6 +128,7 @@ int main(int argc, char *argv[]) {
const double minZoom = minZoomValue ? args::get(minZoomValue) : 0.0;
const double maxZoom = maxZoomValue ? args::get(maxZoomValue) : 15.0;
const double pixelRatio = pixelRatioValue ? args::get(pixelRatioValue) : 1.0;
+ const bool includeIdeographs = includeIdeographsValue ? args::get(includeIdeographsValue) : false;
const std::string output = outputValue ? args::get(outputValue) : "offline.db";
using namespace mbgl;
@@ -136,7 +138,7 @@ int main(int argc, char *argv[]) {
try {
std::string json = readFile(geometryValue.Get());
auto geometry = parseGeometry(json);
- return OfflineRegionDefinition{ OfflineGeometryRegionDefinition(style, geometry, minZoom, maxZoom, pixelRatio) };
+ return OfflineRegionDefinition{ OfflineGeometryRegionDefinition(style, geometry, minZoom, maxZoom, pixelRatio, includeIdeographs) };
} catch(const std::runtime_error& e) {
std::cerr << "Could not parse geojson file " << geometryValue.Get() << ": " << e.what() << std::endl;
exit(1);
@@ -148,7 +150,7 @@ int main(int argc, char *argv[]) {
const double south = southValue ? args::get(southValue) : 38.1;
const double east = eastValue ? args::get(eastValue) : -121.7;
LatLngBounds boundingBox = LatLngBounds::hull(LatLng(north, west), LatLng(south, east));
- return OfflineRegionDefinition{ OfflineTilePyramidRegionDefinition(style, boundingBox, minZoom, maxZoom, pixelRatio) };
+ return OfflineRegionDefinition{ OfflineTilePyramidRegionDefinition(style, boundingBox, minZoom, maxZoom, pixelRatio, includeIdeographs) };
}
}();