mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 08:20:05 +00:00
parent
effe78e1be
commit
6000abdeb3
7 changed files with 120 additions and 7 deletions
|
|
@ -154,6 +154,7 @@ public:
|
|||
QPointF lastPos_;
|
||||
std::size_t currentStyleIndex_;
|
||||
const MapStyle* currentStyle_;
|
||||
std::string initialStyleName_ {};
|
||||
|
||||
uint64_t frameDraws_;
|
||||
|
||||
|
|
@ -585,6 +586,11 @@ void MapWidget::SetMapParameters(
|
|||
}
|
||||
}
|
||||
|
||||
void MapWidget::SetInitialMapStyle(const std::string& styleName)
|
||||
{
|
||||
p->initialStyleName_ = styleName;
|
||||
}
|
||||
|
||||
void MapWidget::SetMapStyle(const std::string& styleName)
|
||||
{
|
||||
const auto& mapProviderInfo = GetMapProviderInfo(p->mapProvider_);
|
||||
|
|
@ -830,7 +836,14 @@ void MapWidget::initializeGL()
|
|||
p->prevPitch_);
|
||||
|
||||
// Update style
|
||||
changeStyle();
|
||||
if (p->initialStyleName_.empty())
|
||||
{
|
||||
changeStyle();
|
||||
}
|
||||
else
|
||||
{
|
||||
SetMapStyle(p->initialStyleName_);
|
||||
}
|
||||
|
||||
connect(p->map_.get(),
|
||||
&QMapLibreGL::Map::mapChanged,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue