summaryrefslogtreecommitdiff
path: root/linux/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linux/main.cpp')
-rw-r--r--linux/main.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/linux/main.cpp b/linux/main.cpp
index 6bd2f7c430..81bb684650 100644
--- a/linux/main.cpp
+++ b/linux/main.cpp
@@ -1,5 +1,5 @@
#include <mbgl/mbgl.hpp>
-#include "../platform/default/default_styles.hpp"
+#include <mbgl/util/default_styles.hpp>
#include <mbgl/util/uv.hpp>
#include <mbgl/platform/log.hpp>
#include <mbgl/platform/platform.hpp>
@@ -131,22 +131,22 @@ int main(int argc, char *argv[]) {
view->setChangeStyleCallback([&map] () {
static uint8_t currentStyleIndex;
- if (++currentStyleIndex == mbgl::util::defaultStyles.size()) {
+ if (++currentStyleIndex == mbgl::util::default_styles::numOrderedStyles) {
currentStyleIndex = 0;
}
- const auto& newStyle = mbgl::util::defaultStyles[currentStyleIndex];
- map.setStyleURL(newStyle.first);
- view->setWindowTitle(newStyle.second);
+ mbgl::util::default_styles::DefaultStyle newStyle = mbgl::util::default_styles::orderedStyles[currentStyleIndex];
+ map.setStyleURL(newStyle.url);
+ view->setWindowTitle(newStyle.name);
- mbgl::Log::Info(mbgl::Event::Setup, std::string("Changed style to: ") + newStyle.first);
+ mbgl::Log::Info(mbgl::Event::Setup, std::string("Changed style to: ") + newStyle.name);
});
// Load style
if (style.empty()) {
- const auto& newStyle = mbgl::util::defaultStyles.front();
- style = newStyle.first;
- view->setWindowTitle(newStyle.second);
+ mbgl::util::default_styles::DefaultStyle newStyle = mbgl::util::default_styles::orderedStyles[0];
+ style = newStyle.url;
+ view->setWindowTitle(newStyle.name);
}
map.setStyleURL(style);