#pragma once #include #include #include #include #include namespace mbgl { class FileSource; class Scheduler; namespace style { class Light; class Image; class Source; class Layer; class Style { public: Style(Scheduler&, FileSource&, float pixelRatio); ~Style(); void loadJSON(const std::string&); void loadURL(const std::string&); std::string getJSON() const; std::string getURL() const; // Defaults std::string getName() const; LatLng getDefaultLatLng() const; double getDefaultZoom() const; double getDefaultBearing() const; double getDefaultPitch() const; // TransitionOptions TransitionOptions getTransitionOptions() const; void setTransitionOptions(const TransitionOptions&); // Light Light* getLight(); const Light* getLight() const; void setLight(std::unique_ptr); // Images const Image* getImage(const std::string&) const; void addImage(std::unique_ptr); void removeImage(const std::string&); // Sources std::vector< Source*> getSources(); std::vector getSources() const; Source* getSource(const std::string&); const Source* getSource(const std::string&) const; void addSource(std::unique_ptr); std::unique_ptr removeSource(const std::string& sourceID); // Layers std::vector< Layer*> getLayers(); std::vector getLayers() const; Layer* getLayer(const std::string&); const Layer* getLayer(const std::string&) const; void addLayer(std::unique_ptr, const optional& beforeLayerID = {}); std::unique_ptr removeLayer(const std::string& layerID); // Private implementation class Impl; const std::unique_ptr impl; }; } // namespace style } // namespace mbgl