summaryrefslogtreecommitdiff
path: root/platform/default
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2015-10-29 12:23:50 -0700
committerMinh Nguyễn <mxn@1ec5.org>2015-10-30 13:09:37 -0700
commit557b8afb7c310a6330f741ca0f38fcec098f3156 (patch)
tree701483c58128279167261b55f6ecbdfc3353f9a5 /platform/default
parent3b6dc37e396931c883fe6ab602802dbb00defed9 (diff)
downloadqtlocation-mapboxgl-557b8afb7c310a6330f741ca0f38fcec098f3156.tar.gz
[core][iOS] Source iOS styles from default_styles
Moved mbgl::util::default_styles to a more appropriate location, where iOS platform code can also find it. Moved -[MGLMapView bundledStyleURLs] (which is now deprecated) and the style switcher in iosapp to default_styles. Added a collection of convenience methods for getting style URLs. It makes little sense to layer an enum atop this, as MapKit does, because MGLMapView styles aren’t limited to this set. A good analogy is UIColor. This also makes for a good entry point for future runtime styling APIs. Introduced independent constants for each default style, because it’s more common to need access to a particular style than to iterate over them. This fact is apparent in the MGLStyle class, which now uses macros and assertions to ensure that it’s kept up-to-date with changes in default_styles. /ref #1462
Diffstat (limited to 'platform/default')
-rw-r--r--platform/default/default_styles.cpp16
-rw-r--r--platform/default/default_styles.hpp17
2 files changed, 0 insertions, 33 deletions
diff --git a/platform/default/default_styles.cpp b/platform/default/default_styles.cpp
deleted file mode 100644
index 43af4767f5..0000000000
--- a/platform/default/default_styles.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-#include "default_styles.hpp"
-
-namespace mbgl {
-namespace util {
-
-const std::vector<std::pair<std::string, std::string>> defaultStyles = {
- { "mapbox://styles/mapbox/streets-v8", "Streets" },
- { "mapbox://styles/mapbox/emerald-v8", "Emerald" },
- { "mapbox://styles/mapbox/light-v8", "Light" },
- { "mapbox://styles/mapbox/dark-v8", "Dark" },
- { "mapbox://styles/mapbox/satellite-v8", "Satellite" },
- { "mapbox://styles/mapbox/satellite-hybrid-v8", "Hybrid" },
-};
-
-} // end namespace util
-} // end namespace mbgl
diff --git a/platform/default/default_styles.hpp b/platform/default/default_styles.hpp
deleted file mode 100644
index dc10009305..0000000000
--- a/platform/default/default_styles.hpp
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef MBGL_PLATFORM_DEFAULT_STYLES
-#define MBGL_PLATFORM_DEFAULT_STYLES
-
-#include <vector>
-#include <string>
-
-namespace mbgl {
-namespace util {
-
-// A list of default styles, with the first string being the URL
-// and the second being the user-visible name.
-extern const std::vector<std::pair<std::string, std::string>> defaultStyles;
-
-} // end namespace util
-} // end namespace mbgl
-
-#endif