Add map copyrights and map provider to map context

This commit is contained in:
Dan Paulat 2024-03-02 23:29:44 -06:00
parent 6b00c55bac
commit 5c7c7e6a19
5 changed files with 73 additions and 25 deletions

View file

@ -29,6 +29,9 @@ public:
int16_t radarProductCode_ {0};
QMapLibre::CustomLayerRenderParameters renderParameters_ {};
MapProvider mapProvider_ {MapProvider::Unknown};
std::string mapCopyrights_ {};
std::shared_ptr<view::OverlayProductView> overlayProductView_ {nullptr};
std::shared_ptr<view::RadarProductView> radarProductView_;
};
@ -48,6 +51,16 @@ std::weak_ptr<QMapLibre::Map> MapContext::map() const
return p->map_;
}
std::string MapContext::map_copyrights() const
{
return p->mapCopyrights_;
}
MapProvider MapContext::map_provider() const
{
return p->mapProvider_;
}
MapSettings& MapContext::settings()
{
return p->settings_;
@ -94,6 +107,16 @@ void MapContext::set_map(const std::shared_ptr<QMapLibre::Map>& map)
p->map_ = map;
}
void MapContext::set_map_copyrights(const std::string& copyrights)
{
p->mapCopyrights_ = copyrights;
}
void MapContext::set_map_provider(MapProvider provider)
{
p->mapProvider_ = provider;
}
void MapContext::set_overlay_product_view(
const std::shared_ptr<view::OverlayProductView>& overlayProductView)
{