diff options
author | Tadej Novak <tadej@tano.si> | 2019-10-19 10:38:44 +0200 |
---|---|---|
committer | Tadej Novak <tadej@tano.si> | 2019-11-09 12:00:25 +0200 |
commit | 664a83674b2bf8313763870c9eca7c4c558a14bc (patch) | |
tree | 72797ebd7a34d0b5c0e7a387d5cc36cc66276a99 /src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp | |
parent | 56849a2b9c605cbbeed5d7eff24ece1808d07748 (diff) | |
download | qtlocation-664a83674b2bf8313763870c9eca7c4c558a14bc.tar.gz |
Add image source support to Mapbox GL plugin
[ChangeLog][QtLocation][MapboxGL] Added support for image sources
Change-Id: I5334f36e033d26824300d90ad8d9aacf3ac75ac3
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Diffstat (limited to 'src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp')
-rw-r--r-- | src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp b/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp index b45fdef1..cb8dc2be 100644 --- a/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp +++ b/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp @@ -552,7 +552,7 @@ QSharedPointer<QMapboxGLStyleChange> QMapboxGLStyleAddSource::fromMapParameter(Q Q_ASSERT(param->type() == "source"); static const QStringList acceptedSourceTypes = QStringList() - << QStringLiteral("vector") << QStringLiteral("raster") << QStringLiteral("raster-dem") << QStringLiteral("geojson"); + << QStringLiteral("vector") << QStringLiteral("raster") << QStringLiteral("raster-dem") << QStringLiteral("geojson") << QStringLiteral("image"); QString sourceType = param->property("sourceType").toString(); @@ -579,6 +579,10 @@ QSharedPointer<QMapboxGLStyleChange> QMapboxGLStyleAddSource::fromMapParameter(Q source->m_params[QStringLiteral("data")] = data.toUtf8(); } } break; + case 4: { // image + source->m_params[QStringLiteral("url")] = param->property("url"); + source->m_params[QStringLiteral("coordinates")] = param->property("coordinates"); + } break; } return QSharedPointer<QMapboxGLStyleChange>(source); |