summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2017-09-05 18:46:09 +0200
committerPaolo Angelelli <paolo.angelelli@qt.io>2017-09-05 18:47:14 +0200
commit021f2157cd18a6d37a9569bf3aba34f3af173ed5 (patch)
tree6fc11a62ecd3df6e4214ecc2860f904d0e31dbbc
parent222ba4b733f67a51758708e27b7c76cdaaa3e228 (diff)
parent8f80da7ea0165adb492c71255d0eea5f08c0af8e (diff)
downloadqtlocation-021f2157cd18a6d37a9569bf3aba34f3af173ed5.tar.gz
Merge remote-tracking branch 'origin/5.9' into 5.10
Change-Id: Ibfd8b430011abb0a7174bbcc158b03f8e26492eb
-rw-r--r--configure.json3
-rw-r--r--dist/changes-5.6.338
-rw-r--r--examples/location/places_map/doc/images/places_map.pngbin157761 -> 167995 bytes
-rw-r--r--examples/location/places_map/main.cpp2
-rw-r--r--examples/location/places_map/places_map.qml3
-rw-r--r--src/imports/positioning/qdeclarativepositionsource.cpp17
-rw-r--r--src/location/configure.json70
-rw-r--r--src/location/declarativemaps/qdeclarativecirclemapitem.cpp10
-rw-r--r--src/location/declarativemaps/qdeclarativecirclemapitem_p.h8
-rw-r--r--src/plugins/geoservices/geoservices.pro12
-rw-r--r--src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp31
-rw-r--r--src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp61
-rw-r--r--src/plugins/geoservices/mapboxgl/qmapboxglstylechange_p.h1
-rw-r--r--src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp12
-rw-r--r--src/positioning/configure.json2
15 files changed, 235 insertions, 35 deletions
diff --git a/configure.json b/configure.json
index d54624af..379d8b4a 100644
--- a/configure.json
+++ b/configure.json
@@ -1,5 +1,6 @@
{
"subconfigs": [
- "src/positioning"
+ "src/positioning",
+ "src/location"
]
}
diff --git a/dist/changes-5.6.3 b/dist/changes-5.6.3
new file mode 100644
index 00000000..4709ff2b
--- /dev/null
+++ b/dist/changes-5.6.3
@@ -0,0 +1,38 @@
+Qt 5.6.3 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 5.6.0.
+
+For more details, refer to the online documentation included in this
+distribution. The documentation is also available online:
+
+ http://doc.qt.io/qt-5/index.html
+
+The Qt version 5.6 series is binary compatible with the 5.5.x series.
+Applications compiled for 5.5 will continue to run with 5.6.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+ https://bugreports.qt.io/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+QtLocation
+----------
+
+ - [QTBUG-56099] Updated HERE plugin base address
+ - [QTBUG-56119] Added OSRMv5 support to the osm plugin
+ - [QTBUG-57027] Fixed fitViewportToGeoShape on rectangles crossing the date
+ line.
+ - Updated HERE plugin geocoding endpoints
+
+
+QtPositioning
+-------------
+
+ - [QTBUG-54844] Fixed error status for QGeoPositionInfoSourceAndroid
+ - [QTBUG-56623] WinRT backend now uses backend-provided timestamps
diff --git a/examples/location/places_map/doc/images/places_map.png b/examples/location/places_map/doc/images/places_map.png
index 72317e2d..4982df23 100644
--- a/examples/location/places_map/doc/images/places_map.png
+++ b/examples/location/places_map/doc/images/places_map.png
Binary files differ
diff --git a/examples/location/places_map/main.cpp b/examples/location/places_map/main.cpp
index a2cd8fc0..aeb7eaf3 100644
--- a/examples/location/places_map/main.cpp
+++ b/examples/location/places_map/main.cpp
@@ -46,6 +46,8 @@ int main(int argc, char **argv)
QGuiApplication app(argc,argv);
QQuickView view;
view.setSource(QUrl(QStringLiteral("qrc:///places_map.qml")));
+ view.setWidth(360);
+ view.setHeight(640);
view.show();
return app.exec();
}
diff --git a/examples/location/places_map/places_map.qml b/examples/location/places_map/places_map.qml
index 467a31de..cd487fa9 100644
--- a/examples/location/places_map/places_map.qml
+++ b/examples/location/places_map/places_map.qml
@@ -45,8 +45,7 @@ import QtLocation 5.6
//! [Imports]
Rectangle {
- width: 360
- height: 640
+ anchors.fill: parent
//! [Initialize Plugin]
Plugin {
diff --git a/src/imports/positioning/qdeclarativepositionsource.cpp b/src/imports/positioning/qdeclarativepositionsource.cpp
index b0e990da..05232d51 100644
--- a/src/imports/positioning/qdeclarativepositionsource.cpp
+++ b/src/imports/positioning/qdeclarativepositionsource.cpp
@@ -559,10 +559,9 @@ QDeclarativePositionSource::PositioningMethods QDeclarativePositionSource::prefe
void QDeclarativePositionSource::start()
{
- if (!m_positionSource)
- return;
+ if (m_positionSource)
+ m_positionSource->startUpdates();
- m_positionSource->startUpdates();
if (!m_active) {
m_active = true;
emit activeChanged();
@@ -721,6 +720,12 @@ void QDeclarativePositionSource::componentComplete()
static_cast<QGeoPositionInfoSource::PositioningMethods>(int(m_preferredPositioningMethods)));
setPosition(m_positionSource->lastKnownPosition());
+
+ if (m_active)
+ QTimer::singleShot(0, this, SLOT(start())); // delay ensures all properties have been set
+ } else if (m_active) {
+ m_active = false;
+ emit activeChanged();
}
if (previousUpdateInterval != updateInterval())
@@ -733,12 +738,6 @@ void QDeclarativePositionSource::componentComplete()
emit supportedPositioningMethodsChanged();
emit validityChanged();
-
- if (m_active) {
- m_active = false;
- emit activeChanged();
- }
-
emit nameChanged();
}
}
diff --git a/src/location/configure.json b/src/location/configure.json
new file mode 100644
index 00000000..4de6e865
--- /dev/null
+++ b/src/location/configure.json
@@ -0,0 +1,70 @@
+{
+ "module": "location",
+ "depends": [
+ "gui"
+ ],
+
+ "features": {
+ "geoservices_osm": {
+ "label": "OpenStreetMap",
+ "purpose": "Provides access to OpenStreetMap geoservices",
+ "section": "Location",
+ "condition": "features.concurrent",
+ "output": [ "privateFeature" ]
+ },
+ "geoservices_here": {
+ "label": "HERE",
+ "purpose": "Provides access to HERE geoservices",
+ "section": "Location",
+ "output": [ "privateFeature" ]
+ },
+ "geoservices_esri": {
+ "label": "Esri",
+ "purpose": "Provides access to Esri geoservices",
+ "section": "Location",
+ "output": [ "privateFeature" ]
+ },
+ "geoservices_mapbox": {
+ "label": "Mapbox",
+ "purpose": "Provides access to Mapbox geoservices",
+ "section": "Location",
+ "output": [ "privateFeature" ]
+ },
+ "geoservices_mapboxgl": {
+ "label": "MapboxGL",
+ "purpose": "Provides access to the Mapbox vector maps",
+ "section": "Location",
+ "condition": [
+ "features.opengl",
+ "features.c++14",
+ "!config.qnx && (!config.win32 || config.mingw)"
+ ],
+ "output": [ "privateFeature" ]
+ },
+ "geoservices_itemsoverlay": {
+ "label": "Itemsoverlay",
+ "purpose": "Provides access to the itemsoverlay maps",
+ "section": "Location",
+ "output": [ "privateFeature" ]
+ }
+ },
+
+ "summary": [
+ {
+ "section": "Qt Location",
+ "entries": [
+ {
+ "section": "Geoservice plugins",
+ "entries": [
+ "geoservices_osm",
+ "geoservices_here",
+ "geoservices_esri",
+ "geoservices_mapbox",
+ "geoservices_mapboxgl",
+ "geoservices_itemsoverlay"
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/src/location/declarativemaps/qdeclarativecirclemapitem.cpp b/src/location/declarativemaps/qdeclarativecirclemapitem.cpp
index 5f002bf9..91328dc7 100644
--- a/src/location/declarativemaps/qdeclarativecirclemapitem.cpp
+++ b/src/location/declarativemaps/qdeclarativecirclemapitem.cpp
@@ -262,7 +262,7 @@ void QGeoMapCircleGeometry::updateScreenPointsInvert(const QList<QDoubleVector2D
sourceBounds_ = screenBounds_;
}
-static bool crossEarthPole(const QGeoCoordinate &center, qreal distance)
+bool QDeclarativeCircleMapItem::crossEarthPole(const QGeoCoordinate &center, qreal distance)
{
qreal poleLat = 90;
QGeoCoordinate northPole = QGeoCoordinate(poleLat, center.longitude());
@@ -275,7 +275,7 @@ static bool crossEarthPole(const QGeoCoordinate &center, qreal distance)
return false;
}
-static void calculatePeripheralPoints(QList<QGeoCoordinate> &path,
+void QDeclarativeCircleMapItem::calculatePeripheralPoints(QList<QGeoCoordinate> &path,
const QGeoCoordinate &center,
qreal distance,
int steps,
@@ -644,9 +644,9 @@ void QDeclarativeCircleMapItem::updateCirclePathForRendering(QList<QDoubleVector
const QGeoCoordinate &center,
qreal distance)
{
- qreal poleLat = 90;
- qreal distanceToNorthPole = center.distanceTo(QGeoCoordinate(poleLat, 0));
- qreal distanceToSouthPole = center.distanceTo(QGeoCoordinate(-poleLat, 0));
+ const qreal poleLat = 90;
+ const qreal distanceToNorthPole = center.distanceTo(QGeoCoordinate(poleLat, 0));
+ const qreal distanceToSouthPole = center.distanceTo(QGeoCoordinate(-poleLat, 0));
bool crossNorthPole = distanceToNorthPole < distance;
bool crossSouthPole = distanceToSouthPole < distance;
diff --git a/src/location/declarativemaps/qdeclarativecirclemapitem_p.h b/src/location/declarativemaps/qdeclarativecirclemapitem_p.h
index 15774427..c117b444 100644
--- a/src/location/declarativemaps/qdeclarativecirclemapitem_p.h
+++ b/src/location/declarativemaps/qdeclarativecirclemapitem_p.h
@@ -96,6 +96,12 @@ public:
const QGeoShape &geoShape() const Q_DECL_OVERRIDE;
QGeoMap::ItemType itemType() const Q_DECL_OVERRIDE;
+ static bool crossEarthPole(const QGeoCoordinate &center, qreal distance);
+ static void calculatePeripheralPoints(QList<QGeoCoordinate> &path, const QGeoCoordinate &center,
+ qreal distance, int steps, QGeoCoordinate &leftBound);
+ bool preserveCircleGeometry(QList<QDoubleVector2D> &path, const QGeoCoordinate &center,
+ qreal distance);
+
Q_SIGNALS:
void centerChanged(const QGeoCoordinate &center);
void radiusChanged(qreal radius);
@@ -111,8 +117,6 @@ protected Q_SLOTS:
private:
void updateCirclePath();
- bool preserveCircleGeometry(QList<QDoubleVector2D> &path, const QGeoCoordinate &center,
- qreal distance);
void updateCirclePathForRendering(QList<QDoubleVector2D> &path, const QGeoCoordinate &center,
qreal distance);
diff --git a/src/plugins/geoservices/geoservices.pro b/src/plugins/geoservices/geoservices.pro
index 07c34798..b81ad34a 100644
--- a/src/plugins/geoservices/geoservices.pro
+++ b/src/plugins/geoservices/geoservices.pro
@@ -1,12 +1,14 @@
TEMPLATE = subdirs
-SUBDIRS = nokia mapbox esri itemsoverlay
+QT_FOR_CONFIG += location-private # pulls in the features defined in configure.json
-qtConfig(concurrent) {
- SUBDIRS += osm
-}
+qtConfig(geoservices_here): SUBDIRS += nokia
+qtConfig(geoservices_mapbox): SUBDIRS += mapbox
+qtConfig(geoservices_esri): SUBDIRS += esri
+qtConfig(geoservices_itemsoverlay): SUBDIRS += itemsoverlay
+qtConfig(geoservices_osm): SUBDIRS += osm
-qtConfig(opengl):qtConfig(c++14):!win32|mingw:!qnx {
+qtConfig(geoservices_mapboxgl) {
!exists(../../3rdparty/mapbox-gl-native/mapbox-gl-native.pro) {
warning("Submodule mapbox-gl-native does not exist. Run 'git submodule update --init' on qtlocation.")
} else {
diff --git a/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp b/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp
index 58459e00..8df00905 100644
--- a/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp
+++ b/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp
@@ -176,8 +176,7 @@ void QGeoMapMapboxGLPrivate::removeParameter(QGeoMapParameter *param)
QGeoMap::ItemTypes QGeoMapMapboxGLPrivate::supportedMapItemTypes() const
{
- // TODO https://bugreports.qt.io/browse/QTBUG-58869
- return QGeoMap::MapRectangle | QGeoMap::MapPolygon | QGeoMap::MapPolyline;
+ return QGeoMap::MapRectangle | QGeoMap::MapCircle | QGeoMap::MapPolygon | QGeoMap::MapPolyline;
}
void QGeoMapMapboxGLPrivate::addMapItem(QDeclarativeGeoMapItemBase *item)
@@ -188,25 +187,40 @@ void QGeoMapMapboxGLPrivate::addMapItem(QDeclarativeGeoMapItemBase *item)
case QGeoMap::NoItem:
case QGeoMap::MapQuickItem:
case QGeoMap::CustomMapItem:
- case QGeoMap::MapCircle:
return;
case QGeoMap::MapRectangle: {
- QDeclarativeRectangleMapItem *mapItem = qobject_cast<QDeclarativeRectangleMapItem *>(item);
+ QDeclarativeRectangleMapItem *mapItem = static_cast<QDeclarativeRectangleMapItem *>(item);
+ QObject::connect(mapItem, &QQuickItem::visibleChanged, q, &QGeoMapMapboxGL::onMapItemPropertyChanged);
+ QObject::connect(mapItem, &QDeclarativeGeoMapItemBase::mapItemOpacityChanged, q, &QGeoMapMapboxGL::onMapItemPropertyChanged);
QObject::connect(mapItem, &QDeclarativeRectangleMapItem::bottomRightChanged, q, &QGeoMapMapboxGL::onMapItemGeometryChanged);
QObject::connect(mapItem, &QDeclarativeRectangleMapItem::topLeftChanged, q, &QGeoMapMapboxGL::onMapItemGeometryChanged);
QObject::connect(mapItem, &QDeclarativeRectangleMapItem::colorChanged, q, &QGeoMapMapboxGL::onMapItemPropertyChanged);
QObject::connect(mapItem->border(), &QDeclarativeMapLineProperties::colorChanged, q, &QGeoMapMapboxGL::onMapItemSubPropertyChanged);
QObject::connect(mapItem->border(), &QDeclarativeMapLineProperties::widthChanged, q, &QGeoMapMapboxGL::onMapItemUnsupportedPropertyChanged);
} break;
+ case QGeoMap::MapCircle: {
+ QDeclarativeCircleMapItem *mapItem = static_cast<QDeclarativeCircleMapItem *>(item);
+ QObject::connect(mapItem, &QQuickItem::visibleChanged, q, &QGeoMapMapboxGL::onMapItemPropertyChanged);
+ QObject::connect(mapItem, &QDeclarativeGeoMapItemBase::mapItemOpacityChanged, q, &QGeoMapMapboxGL::onMapItemPropertyChanged);
+ QObject::connect(mapItem, &QDeclarativeCircleMapItem::centerChanged, q, &QGeoMapMapboxGL::onMapItemGeometryChanged);
+ QObject::connect(mapItem, &QDeclarativeCircleMapItem::radiusChanged, q, &QGeoMapMapboxGL::onMapItemGeometryChanged);
+ QObject::connect(mapItem, &QDeclarativeCircleMapItem::colorChanged, q, &QGeoMapMapboxGL::onMapItemPropertyChanged);
+ QObject::connect(mapItem->border(), &QDeclarativeMapLineProperties::colorChanged, q, &QGeoMapMapboxGL::onMapItemSubPropertyChanged);
+ QObject::connect(mapItem->border(), &QDeclarativeMapLineProperties::widthChanged, q, &QGeoMapMapboxGL::onMapItemUnsupportedPropertyChanged);
+ } break;
case QGeoMap::MapPolygon: {
- QDeclarativePolygonMapItem *mapItem = qobject_cast<QDeclarativePolygonMapItem *>(item);
+ QDeclarativePolygonMapItem *mapItem = static_cast<QDeclarativePolygonMapItem *>(item);
+ QObject::connect(mapItem, &QQuickItem::visibleChanged, q, &QGeoMapMapboxGL::onMapItemPropertyChanged);
+ QObject::connect(mapItem, &QDeclarativeGeoMapItemBase::mapItemOpacityChanged, q, &QGeoMapMapboxGL::onMapItemPropertyChanged);
QObject::connect(mapItem, &QDeclarativePolygonMapItem::pathChanged, q, &QGeoMapMapboxGL::onMapItemGeometryChanged);
QObject::connect(mapItem, &QDeclarativePolygonMapItem::colorChanged, q, &QGeoMapMapboxGL::onMapItemGeometryChanged);
QObject::connect(mapItem->border(), &QDeclarativeMapLineProperties::colorChanged, q, &QGeoMapMapboxGL::onMapItemSubPropertyChanged);
QObject::connect(mapItem->border(), &QDeclarativeMapLineProperties::widthChanged, q, &QGeoMapMapboxGL::onMapItemUnsupportedPropertyChanged);
} break;
case QGeoMap::MapPolyline: {
- QDeclarativePolylineMapItem *mapItem = qobject_cast<QDeclarativePolylineMapItem *>(item);
+ QDeclarativePolylineMapItem *mapItem = static_cast<QDeclarativePolylineMapItem *>(item);
+ QObject::connect(mapItem, &QQuickItem::visibleChanged, q, &QGeoMapMapboxGL::onMapItemPropertyChanged);
+ QObject::connect(mapItem, &QDeclarativeGeoMapItemBase::mapItemOpacityChanged, q, &QGeoMapMapboxGL::onMapItemPropertyChanged);
QObject::connect(mapItem, &QDeclarativePolylineMapItem::pathChanged, q, &QGeoMapMapboxGL::onMapItemGeometryChanged);
QObject::connect(mapItem->line(), &QDeclarativeMapLineProperties::colorChanged, q, &QGeoMapMapboxGL::onMapItemSubPropertyChanged);
QObject::connect(mapItem->line(), &QDeclarativeMapLineProperties::widthChanged, q, &QGeoMapMapboxGL::onMapItemSubPropertyChanged);
@@ -228,11 +242,13 @@ void QGeoMapMapboxGLPrivate::removeMapItem(QDeclarativeGeoMapItemBase *item)
case QGeoMap::NoItem:
case QGeoMap::MapQuickItem:
case QGeoMap::CustomMapItem:
- case QGeoMap::MapCircle:
return;
case QGeoMap::MapRectangle:
q->disconnect(static_cast<QDeclarativeRectangleMapItem *>(item)->border());
break;
+ case QGeoMap::MapCircle:
+ q->disconnect(static_cast<QDeclarativeCircleMapItem *>(item)->border());
+ break;
case QGeoMap::MapPolygon:
q->disconnect(static_cast<QDeclarativePolygonMapItem *>(item)->border());
break;
@@ -383,6 +399,7 @@ void QGeoMapMapboxGL::onMapItemPropertyChanged()
QDeclarativeGeoMapItemBase *item = static_cast<QDeclarativeGeoMapItemBase *>(sender());
d->m_styleChanges << QMapboxGLStyleSetPaintProperty::fromMapItem(item);
+ d->m_styleChanges << QMapboxGLStyleSetLayoutProperty::fromMapItem(item);
emit sgNodeChanged();
}
diff --git a/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp b/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp
index f79f0a38..69bb6e4b 100644
--- a/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp
+++ b/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp
@@ -86,6 +86,32 @@ QMapbox::Feature featureFromMapRectangle(QDeclarativeRectangleMapItem *mapItem)
return QMapbox::Feature(QMapbox::Feature::PolygonType, geometry, {}, getId(mapItem));
}
+QMapbox::Feature featureFromMapCircle(QDeclarativeCircleMapItem *mapItem)
+{
+ static const int circleSamples = 128;
+
+ QList<QGeoCoordinate> path;
+ QGeoCoordinate leftBound;
+ QDeclarativeCircleMapItem::calculatePeripheralPoints(path, mapItem->center(), mapItem->radius(), circleSamples, leftBound);
+ QList<QDoubleVector2D> pathProjected;
+ for (const QGeoCoordinate &c : qAsConst(path))
+ pathProjected << mapItem->map()->geoProjection().geoToMapProjection(c);
+ if (QDeclarativeCircleMapItem::crossEarthPole(mapItem->center(), mapItem->radius()))
+ mapItem->preserveCircleGeometry(pathProjected, mapItem->center(), mapItem->radius());
+ path.clear();
+ for (const QDoubleVector2D &c : qAsConst(pathProjected))
+ path << mapItem->map()->geoProjection().mapProjectionToGeo(c);
+
+
+ QMapbox::Coordinates coordinates;
+ for (const QGeoCoordinate &coordinate : path) {
+ coordinates << QMapbox::Coordinate { coordinate.latitude(), coordinate.longitude() };
+ }
+ coordinates.append(coordinates.first()); // closing the path
+ QMapbox::CoordinatesCollections geometry { { coordinates } };
+ return QMapbox::Feature(QMapbox::Feature::PolygonType, geometry, {}, getId(mapItem));
+}
+
QMapbox::Feature featureFromMapPolygon(QDeclarativePolygonMapItem *mapItem)
{
const QGeoPath *path = static_cast<const QGeoPath *>(&mapItem->geoShape());
@@ -126,6 +152,8 @@ QMapbox::Feature featureFromMapItem(QDeclarativeGeoMapItemBase *item)
switch (item->itemType()) {
case QGeoMap::MapRectangle:
return featureFromMapRectangle(static_cast<QDeclarativeRectangleMapItem *>(item));
+ case QGeoMap::MapCircle:
+ return featureFromMapCircle(static_cast<QDeclarativeCircleMapItem *>(item));
case QGeoMap::MapPolygon:
return featureFromMapPolygon(static_cast<QDeclarativePolygonMapItem *>(item));
case QGeoMap::MapPolyline:
@@ -182,6 +210,7 @@ QList<QSharedPointer<QMapboxGLStyleChange>> QMapboxGLStyleChange::addMapItem(QDe
switch (item->itemType()) {
case QGeoMap::MapRectangle:
+ case QGeoMap::MapCircle:
case QGeoMap::MapPolygon:
case QGeoMap::MapPolyline:
break;
@@ -250,13 +279,20 @@ QList<QSharedPointer<QMapboxGLStyleChange>> QMapboxGLStyleSetLayoutProperty::fro
QList<QSharedPointer<QMapboxGLStyleChange>> QMapboxGLStyleSetLayoutProperty::fromMapItem(QDeclarativeGeoMapItemBase *item)
{
+ QList<QSharedPointer<QMapboxGLStyleChange>> changes;
+
switch (item->itemType()) {
case QGeoMap::MapPolyline:
- return fromMapItem(static_cast<QDeclarativePolylineMapItem *>(item));
+ changes = fromMapItem(static_cast<QDeclarativePolylineMapItem *>(item));
default:
- qWarning() << "Unsupported QGeoMap item type: " << item->itemType();
- return QList<QSharedPointer<QMapboxGLStyleChange>>();
+ break;
}
+
+ changes << QSharedPointer<QMapboxGLStyleChange>(
+ new QMapboxGLStyleSetLayoutProperty(getId(item), QStringLiteral("visibility"),
+ item->isVisible() ? QStringLiteral("visible") : QStringLiteral("none")));
+
+ return changes;
}
QList<QSharedPointer<QMapboxGLStyleChange>> QMapboxGLStyleSetLayoutProperty::fromMapItem(QDeclarativePolylineMapItem *item)
@@ -325,6 +361,8 @@ QList<QSharedPointer<QMapboxGLStyleChange>> QMapboxGLStyleSetPaintProperty::from
switch (item->itemType()) {
case QGeoMap::MapRectangle:
return fromMapItem(static_cast<QDeclarativeRectangleMapItem *>(item));
+ case QGeoMap::MapCircle:
+ return fromMapItem(static_cast<QDeclarativeCircleMapItem *>(item));
case QGeoMap::MapPolygon:
return fromMapItem(static_cast<QDeclarativePolygonMapItem *>(item));
case QGeoMap::MapPolyline:
@@ -352,6 +390,23 @@ QList<QSharedPointer<QMapboxGLStyleChange>> QMapboxGLStyleSetPaintProperty::from
return changes;
}
+QList<QSharedPointer<QMapboxGLStyleChange>> QMapboxGLStyleSetPaintProperty::fromMapItem(QDeclarativeCircleMapItem *item)
+{
+ QList<QSharedPointer<QMapboxGLStyleChange>> changes;
+ changes.reserve(3);
+
+ const QString id = getId(item);
+
+ changes << QSharedPointer<QMapboxGLStyleChange>(
+ new QMapboxGLStyleSetPaintProperty(id, QStringLiteral("fill-opacity"), item->mapItemOpacity()));
+ changes << QSharedPointer<QMapboxGLStyleChange>(
+ new QMapboxGLStyleSetPaintProperty(id, QStringLiteral("fill-color"), item->color()));
+ changes << QSharedPointer<QMapboxGLStyleChange>(
+ new QMapboxGLStyleSetPaintProperty(id, QStringLiteral("fill-outline-color"), item->border()->color()));
+
+ return changes;
+}
+
QList<QSharedPointer<QMapboxGLStyleChange>> QMapboxGLStyleSetPaintProperty::fromMapItem(QDeclarativePolygonMapItem *item)
{
QList<QSharedPointer<QMapboxGLStyleChange>> changes;
diff --git a/src/plugins/geoservices/mapboxgl/qmapboxglstylechange_p.h b/src/plugins/geoservices/mapboxgl/qmapboxglstylechange_p.h
index aa81d89f..33737c1d 100644
--- a/src/plugins/geoservices/mapboxgl/qmapboxglstylechange_p.h
+++ b/src/plugins/geoservices/mapboxgl/qmapboxglstylechange_p.h
@@ -93,6 +93,7 @@ public:
private:
static QList<QSharedPointer<QMapboxGLStyleChange>> fromMapItem(QDeclarativeRectangleMapItem *);
+ static QList<QSharedPointer<QMapboxGLStyleChange>> fromMapItem(QDeclarativeCircleMapItem *);
static QList<QSharedPointer<QMapboxGLStyleChange>> fromMapItem(QDeclarativePolygonMapItem *);
static QList<QSharedPointer<QMapboxGLStyleChange>> fromMapItem(QDeclarativePolylineMapItem *);
diff --git a/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp b/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp
index 3f31997c..82aa868f 100644
--- a/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp
+++ b/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp
@@ -88,10 +88,16 @@ void QSGMapboxGLTextureNode::render(QQuickWindow *window)
QOpenGLFunctions *f = window->openglContext()->functions();
f->glViewport(0, 0, m_fbo->width(), m_fbo->height());
+ GLint alignment;
+ f->glGetIntegerv(GL_UNPACK_ALIGNMENT, &alignment);
+
m_fbo->bind();
m_map->render();
m_fbo->release();
+ // QTBUG-62861
+ f->glPixelStorei(GL_UNPACK_ALIGNMENT, alignment);
+
window->resetOpenGLState();
markDirty(QSGNode::DirtyMaterial);
}
@@ -125,7 +131,13 @@ void QSGMapboxGLRenderNode::render(const RenderState *state)
f->glScissor(state->scissorRect().x(), state->scissorRect().y(), state->scissorRect().width(), state->scissorRect().height());
f->glEnable(GL_SCISSOR_TEST);
+ GLint alignment;
+ f->glGetIntegerv(GL_UNPACK_ALIGNMENT, &alignment);
+
m_map->render();
+
+ // QTBUG-62861
+ f->glPixelStorei(GL_UNPACK_ALIGNMENT, alignment);
}
QSGRenderNode::StateFlags QSGMapboxGLRenderNode::changedStates() const
diff --git a/src/positioning/configure.json b/src/positioning/configure.json
index 22b77be6..49e32be4 100644
--- a/src/positioning/configure.json
+++ b/src/positioning/configure.json
@@ -38,7 +38,7 @@
"summary": [
{
- "section": "Qt Location",
+ "section": "Qt Positioning",
"entries": [
"gypsy",
"winrt_geolocation"