#include #include #include #include #include #include namespace mbgl { namespace style { Style::Style(Scheduler& scheduler, FileSource& fileSource, float pixelRatio) : impl(std::make_unique(scheduler, fileSource, pixelRatio)) { } Style::~Style() = default; void Style::loadJSON(const std::string& json) { impl->loadJSON(json); } void Style::loadURL(const std::string& url) { impl->loadURL(url); } std::string Style::getJSON() const { return impl->getJSON(); } std::string Style::getURL() const { return impl->getURL(); } std::string Style::getName() const { return impl->getName(); } LatLng Style::getDefaultLatLng() const { return impl->getDefaultLatLng(); } double Style::getDefaultZoom() const { return impl->getDefaultZoom(); } double Style::getDefaultBearing() const { return impl->getDefaultBearing(); } double Style::getDefaultPitch() const { return impl->getDefaultPitch(); } TransitionOptions Style::getTransitionOptions() const { return impl->getTransitionOptions(); } void Style::setTransitionOptions(const TransitionOptions& options) { impl->mutated = true; impl->setTransitionOptions(options); } void Style::setLight(std::unique_ptr light) { impl->setLight(std::move(light)); } Light* Style::getLight() { impl->mutated = true; return impl->getLight(); } const Light* Style::getLight() const { return impl->getLight(); } const Image* Style::getImage(const std::string& name) const { return impl->getImage(name); } void Style::addImage(std::unique_ptr image) { impl->mutated = true; impl->addImage(std::move(image)); } void Style::removeImage(const std::string& name) { impl->mutated = true; impl->removeImage(name); } std::vector Style::getSources() { impl->mutated = true; return impl->getSources(); } std::vector Style::getSources() const { return const_cast(*impl).getSources(); } Source* Style::getSource(const std::string& id) { impl->mutated = true; return impl->getSource(id); } const Source* Style::getSource(const std::string& id) const { return impl->getSource(id); } void Style::addSource(std::unique_ptr source) { impl->mutated = true; impl->addSource(std::move(source)); } std::unique_ptr Style::removeSource(const std::string& sourceID) { impl->mutated = true; return impl->removeSource(sourceID); } std::vector Style::getLayers() { impl->mutated = true; return impl->getLayers(); } std::vector Style::getLayers() const { return const_cast(*impl).getLayers(); } Layer* Style::getLayer(const std::string& layerID) { impl->mutated = true; return impl->getLayer(layerID); } const Layer* Style::getLayer(const std::string& layerID) const { return impl->getLayer(layerID); } void Style::addLayer(std::unique_ptr layer, const optional& before) { impl->mutated = true; impl->addLayer(std::move(layer), before); } std::unique_ptr Style::removeLayer(const std::string& id) { impl->mutated = true; return impl->removeLayer(id); } } // namespace style } // namespace mbgl