|
|
@ -23,10 +23,7 @@ MapWindow::MapWindow(const QMapLibre::Settings &settings) : m_settings(settings) |
|
|
|
QObject::connect(uiState(), &UIState::uiUpdate, this, &MapWindow::updateState); |
|
|
|
QObject::connect(uiState(), &UIState::uiUpdate, this, &MapWindow::updateState); |
|
|
|
|
|
|
|
|
|
|
|
reinit_timer.setSingleShot(true); |
|
|
|
reinit_timer.setSingleShot(true); |
|
|
|
QObject::connect(&reinit_timer, &QTimer::timeout, this, [=] { |
|
|
|
QObject::connect(&reinit_timer, &QTimer::timeout, this, &MapWindow::initializeGL); |
|
|
|
m_settings.setApiKey(get_mapbox_token()); |
|
|
|
|
|
|
|
initializeGL(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
map_overlay = new QWidget (this); |
|
|
|
map_overlay = new QWidget (this); |
|
|
|
map_overlay->setAttribute(Qt::WA_TranslucentBackground, true); |
|
|
|
map_overlay->setAttribute(Qt::WA_TranslucentBackground, true); |
|
|
@ -248,6 +245,7 @@ void MapWindow::resizeGL(int w, int h) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void MapWindow::initializeGL() { |
|
|
|
void MapWindow::initializeGL() { |
|
|
|
|
|
|
|
m_settings.setApiKey(get_mapbox_token()); |
|
|
|
m_map.reset(new QMapLibre::Map(this, m_settings, size(), 1)); |
|
|
|
m_map.reset(new QMapLibre::Map(this, m_settings, size(), 1)); |
|
|
|
|
|
|
|
|
|
|
|
if (last_position) { |
|
|
|
if (last_position) { |
|
|
|