summaryrefslogtreecommitdiff
path: root/include/mbgl/map
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-04-21 13:35:34 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-06-22 08:04:39 -0700
commit1520a56813f82bbe875774fdc2b3df26392278d6 (patch)
treed8f6ccc10e118bd2be6a954951c037f9c2fc1384 /include/mbgl/map
parentbe7e9bbb8d54c775127f53d793c117c4bf5e2764 (diff)
downloadqtlocation-mapboxgl-1520a56813f82bbe875774fdc2b3df26392278d6.tar.gz
[all] Promote Style to public API
Diffstat (limited to 'include/mbgl/map')
-rw-r--r--include/mbgl/map/map.hpp41
1 files changed, 5 insertions, 36 deletions
diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp
index 33b40a8e77..85c95d6491 100644
--- a/include/mbgl/map/map.hpp
+++ b/include/mbgl/map/map.hpp
@@ -9,7 +9,6 @@
#include <mbgl/util/noncopyable.hpp>
#include <mbgl/util/size.hpp>
#include <mbgl/annotation/annotation.hpp>
-#include <mbgl/style/transition_options.hpp>
#include <mbgl/map/camera.hpp>
#include <mbgl/map/query.hpp>
@@ -28,9 +27,7 @@ class Scheduler;
namespace style {
class Image;
-class Source;
-class Layer;
-class Light;
+class Style;
} // namespace style
class Map : private util::noncopyable {
@@ -58,15 +55,15 @@ public:
// Main render function.
void render(View&);
- // Styling
- style::TransitionOptions getTransitionOptions() const;
- void setTransitionOptions(const style::TransitionOptions&);
-
+ // Style
void setStyleURL(const std::string&);
void setStyleJSON(const std::string&);
std::string getStyleURL() const;
std::string getStyleJSON() const;
+ style::Style& getStyle();
+ const style::Style& getStyle() const;
+
// Transition
void cancelTransitions();
void setGestureInProgress(bool);
@@ -156,34 +153,6 @@ public:
void updateAnnotation(AnnotationID, const Annotation&);
void removeAnnotation(AnnotationID);
- // Sources
- std::vector<style::Source*> getSources();
- style::Source* getSource(const std::string& sourceID);
- void addSource(std::unique_ptr<style::Source>);
- std::unique_ptr<style::Source> removeSource(const std::string& sourceID);
-
- // Layers
- std::vector<style::Layer*> getLayers();
- style::Layer* getLayer(const std::string& layerID);
- void addLayer(std::unique_ptr<style::Layer>, const optional<std::string>& beforeLayerID = {});
- std::unique_ptr<style::Layer> removeLayer(const std::string& layerID);
-
- // Images
- void addImage(std::unique_ptr<style::Image>);
- void removeImage(const std::string&);
- const style::Image* getImage(const std::string&);
-
- // Light
- void setLight(std::unique_ptr<style::Light>);
- style::Light* getLight();
-
- // Defaults
- std::string getStyleName() const;
- LatLng getDefaultLatLng() const;
- double getDefaultZoom() const;
- double getDefaultBearing() const;
- double getDefaultPitch() const;
-
// Feature queries
std::vector<Feature> queryRenderedFeatures(const ScreenCoordinate&, const RenderedQueryOptions& options = {});
std::vector<Feature> queryRenderedFeatures(const ScreenBox&, const RenderedQueryOptions& options = {});