[Qt] Implement updateSource

It will create or update a source. Right now only GeoJSON sources are
mutable and can be updated using this method.
This commit is contained in:
Thiago Marcos P. Santos
2016-12-13 19:48:18 -02:00
committed by Thiago Marcos P. Santos
parent 070a9b43e1
commit 8f24119bd0
3 changed files with 28 additions and 3 deletions

View File

@@ -88,7 +88,7 @@ void QQuickMapboxGLRenderer::synchronize(QQuickFramebufferObject *item)
}
for (const auto& change : quickMap->m_sourceChanges) {
m_map->addSource(change.value("id").toString(), change);
m_map->updateSource(change.value("id").toString(), change);
}
quickMap->m_sourceChanges.clear();