summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2015-05-08 15:19:52 +0300
committerThiago Marcos P. Santos <thiago@mapbox.com>2015-05-08 15:40:30 +0300
commit77795d4ee98cfbf1079db5b9519dce2960e1f879 (patch)
tree058eea802d715748cd8dc2194efb3a794d3e2b56 /bin
parent66f67fe2fca73ebd22e9097494bd559caf399790 (diff)
downloadqtlocation-mapboxgl-77795d4ee98cfbf1079db5b9519dce2960e1f879.tar.gz
Update the 'render' to reflect recent API changes
We don't call start/stop anymore and the resize is done via the map object.
Diffstat (limited to 'bin')
-rw-r--r--bin/render.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/bin/render.cpp b/bin/render.cpp
index cd7a54f48d..4902d09305 100644
--- a/bin/render.cpp
+++ b/bin/render.cpp
@@ -79,11 +79,8 @@ int main(int argc, char *argv[]) {
}
}
-
HeadlessView view;
- Map map(view, fileSource);
-
- map.start(Map::Mode::Still);
+ Map map(view, fileSource, MapMode::Still);
// Set access token if present
if (token.size()) {
@@ -93,7 +90,7 @@ int main(int argc, char *argv[]) {
map.setStyleJSON(style, ".");
map.setClasses(classes);
- view.resize(width, height, pixelRatio);
+ map.resize(width, height, pixelRatio);
map.setLatLngZoom({ lat, lon }, zoom);
map.setBearing(bearing);
@@ -115,6 +112,4 @@ int main(int argc, char *argv[]) {
// This loop will terminate once the async was fired.
uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- map.stop();
}