summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-10-08 14:42:22 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-11-02 10:06:01 +0200
commit4cb1cbe5e0b8fab5a8145a00d6d79205148d8971 (patch)
treebf417bf03f8e2127436560f39d4bf3f8543c9fef /src
parentc032c91ee9776568d5593a3619ce0ac355e3135e (diff)
downloadqtlocation-4cb1cbe5e0b8fab5a8145a00d6d79205148d8971.tar.gz
Remove parameterization functionality
The abstraction of plugin-specific parameters makes little sense if we don't want to provide a cross-backend API. So remove this for now. If in the future we want to attach meta-data or backend-specific properties to values or element types, then we might be able to use existing QVariantMap type properties (like QGeoRouteRequest's extraParameters, via QDeclarativeGeoRouteQuery::extraParameters), or register backend specific QML types that applications can opt in to use. This requires a bit of research and experimenting based on specific use cases. If we can't come up with anything better, then bringing back a, perhaps simplified, version of the infrastructure removed here will still be an option. Change-Id: If590a35f2ffb80b0c918d866e88913a9caf75d2b Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/location/CMakeLists.txt3
-rw-r--r--src/location/declarativemaps/qdeclarativegeomapparameter.cpp144
-rw-r--r--src/location/declarativemaps/qdeclarativegeomapparameter_p.h90
-rw-r--r--src/location/declarativemaps/qdeclarativegeoroutemodel.cpp195
-rw-r--r--src/location/declarativemaps/qdeclarativegeoroutemodel_p.h57
-rw-r--r--src/location/maps/qgeomap.cpp37
-rw-r--r--src/location/maps/qgeomap_p.h5
-rw-r--r--src/location/maps/qgeomap_p_p.h5
-rw-r--r--src/location/maps/qgeomapparameter.cpp103
-rw-r--r--src/location/maps/qgeomapparameter_p.h93
-rw-r--r--src/location/maps/qgeorouteparserosrmv5.cpp16
-rw-r--r--src/location/maps/qgeorouterequest.cpp22
-rw-r--r--src/location/maps/qgeorouterequest.h3
-rw-r--r--src/location/maps/qgeorouterequest_p.h1
-rw-r--r--src/location/quickmapitems/qdeclarativegeomap.cpp112
-rw-r--r--src/location/quickmapitems/qdeclarativegeomap_p.h9
-rw-r--r--src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp38
-rw-r--r--src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.h4
-rw-r--r--src/plugins/geoservices/mapboxgl/qgeomapmapboxgl_p.h4
-rw-r--r--src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp219
-rw-r--r--src/plugins/geoservices/mapboxgl/qmapboxglstylechange_p.h11
-rw-r--r--src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp8
22 files changed, 3 insertions, 1176 deletions
diff --git a/src/location/CMakeLists.txt b/src/location/CMakeLists.txt
index bfddbc5c..dae51495 100644
--- a/src/location/CMakeLists.txt
+++ b/src/location/CMakeLists.txt
@@ -39,7 +39,6 @@ qt_internal_add_module(Location
maps/qgeomappingmanagerengine.cpp
maps/qgeomaptype_p.h maps/qgeomaptype_p_p.h maps/qgeomaptype.cpp
maps/qgeomap_p.h maps/qgeomap_p_p.h maps/qgeomap.cpp
- maps/qgeomapparameter_p.h maps/qgeomapparameter.cpp
maps/qgeoprojection_p.h maps/qgeoprojection.cpp
maps/qgeojson_p.h maps/qgeojson.cpp
places/qplacemanager.h places/qplacemanager.cpp
@@ -120,8 +119,6 @@ qt_internal_add_qml_module(Location
# Element types
declarativemaps/qdeclarativegeoserviceprovider_p.h
declarativemaps/qdeclarativegeoserviceprovider.cpp
- declarativemaps/qdeclarativegeomapparameter_p.h
- declarativemaps/qdeclarativegeomapparameter.cpp
declarativemaps/error_messages.cpp declarativemaps/error_messages_p.h
declarativemaps/qdeclarativegeocodemodel.cpp declarativemaps/qdeclarativegeocodemodel_p.h
declarativemaps/qdeclarativegeoroutemodel.cpp declarativemaps/qdeclarativegeoroutemodel_p.h
diff --git a/src/location/declarativemaps/qdeclarativegeomapparameter.cpp b/src/location/declarativemaps/qdeclarativegeomapparameter.cpp
deleted file mode 100644
index 8cb83fe0..00000000
--- a/src/location/declarativemaps/qdeclarativegeomapparameter.cpp
+++ /dev/null
@@ -1,144 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2022 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtLocation module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qdeclarativegeomapparameter_p.h"
-
-#include <QByteArray>
-#include <QMetaObject>
-#include <QMetaProperty>
-#include <QObject>
-
-QT_BEGIN_NAMESPACE
-
-namespace {
-class SignalMapper : public QObject
-{
- Q_OBJECT
-public:
- explicit SignalMapper(const QMetaProperty &p, QDeclarativeGeoMapParameter *parent)
- : QObject(parent), property(p)
- {}
-
- inline static QMetaMethod forwarder =
- staticMetaObject.method(staticMetaObject.indexOfSlot("forward()"));
-
-public slots:
- void forward()
- {
- QDeclarativeGeoMapParameter *that = static_cast<QDeclarativeGeoMapParameter *>(parent());
- that->propertyUpdated(that, property);
- }
-
-private:
- const QMetaProperty property;
-};
-}
-
-/*!
- \qmltype MapParameter
- \inqmlmodule QtLocation
- \ingroup qml-QtLocation5-maps
- \since QtLocation 5.9
- \deprecated
-
- This type is deprecated and has been remamed into \l DynamicParameter.
-*/
-
-/*!
- \qmltype DynamicParameter
- \instantiates QDeclarativeGeoMapParameter
- \inqmlmodule QtLocation
- \ingroup qml-QtLocation5-maps
- \since Qt Location 5.11
-
- \brief The DynamicParameter (previously \l MapParameter ) type represents a parameter for a Map element,
- or other elements used in a Map (such as map items, etc.).
- This type provides a mean to specify plugin-dependent optional dynamic parameters that allow a plugin to
- extend the runtime API of the module.
-
-
- DynamicParameters by default contain only the \l type property, and
- are highly plugin-dependent.
- For this reason, additional properties have to be defined inside a
- DynamicParameter at declaration time, using the QML syntax "property var foo".
-
- What properties have to be put inside a particular DynamicParameter type for
- a particular plugin can be found in the documentation of the plugin.
- \note DynamicParameters are \b optional.
- By not specifying any of them, the Map, or other container elements, will have the default behavior.
-*/
-
-/*!
- \qmlproperty string QtLocation::DynamicParameter::type
-
- Set-once property which holds a string defining the type of the DynamicParameter
-*/
-
-QDeclarativeGeoMapParameter::QDeclarativeGeoMapParameter(QObject *parent)
- : QGeoMapParameter(parent)
-{
-}
-
-bool QDeclarativeGeoMapParameter::isComponentComplete() const
-{
- return m_complete;
-}
-
-void QDeclarativeGeoMapParameter::classBegin()
-{
-}
-
-void QDeclarativeGeoMapParameter::componentComplete()
-{
- for (int i = m_initialPropertyCount; i < metaObject()->propertyCount(); ++i) {
- const QMetaProperty property = metaObject()->property(i);
-
- if (!property.hasNotifySignal())
- return;
-
- SignalMapper *mapper = new SignalMapper(property, this);
- QObject::connect(this, property.notifySignal(), mapper, SignalMapper::forwarder);
- }
- m_complete = true;
- emit completed(this);
-}
-
-QT_END_NAMESPACE
-
-#include "qdeclarativegeomapparameter.moc"
diff --git a/src/location/declarativemaps/qdeclarativegeomapparameter_p.h b/src/location/declarativemaps/qdeclarativegeomapparameter_p.h
deleted file mode 100644
index 23d028cd..00000000
--- a/src/location/declarativemaps/qdeclarativegeomapparameter_p.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2022 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtLocation module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QDECLARATIVEGEOMAPPARAMETER_P_H
-#define QDECLARATIVEGEOMAPPARAMETER_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtLocation/private/qlocationglobal_p.h>
-#include <QtLocation/private/qgeomapparameter_p.h>
-#include <QQmlParserStatus>
-#include <qqml.h>
-
-QT_BEGIN_NAMESPACE
-
-class Q_LOCATION_PRIVATE_EXPORT QDeclarativeGeoMapParameter : public QGeoMapParameter, public QQmlParserStatus
-{
- Q_OBJECT
- QML_NAMED_ELEMENT(DynamicMapParameter)
- QML_ADDED_IN_VERSION(5, 0)
- Q_INTERFACES(QQmlParserStatus)
- // this type must not declare any additional properties
-
-public:
- explicit QDeclarativeGeoMapParameter(QObject *parent = nullptr);
-
- bool isComponentComplete() const;
-
-Q_SIGNALS:
- void completed(QDeclarativeGeoMapParameter *);
-
-protected:
- // QQmlParserStatus implementation
- void classBegin() override;
- void componentComplete() override;
-
-private:
- bool m_complete = false;
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QDeclarativeGeoMapParameter)
-
-#endif // QDECLARATIVEGEOMAPPARAMETER_P_H
diff --git a/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp b/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp
index c6085284..5ad1df4e 100644
--- a/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp
+++ b/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp
@@ -45,7 +45,6 @@
#include <QtQml/qqmlinfo.h>
#include <QtLocation/QGeoRoutingManager>
#include <QtPositioning/QGeoRectangle>
-#include "qdeclarativegeomapparameter_p.h"
QT_BEGIN_NAMESPACE
@@ -55,19 +54,6 @@ static bool compareFloats(qreal a, qreal b)
|| a == b;
}
-static bool compareParameterList(const QList<QDeclarativeGeoMapParameter *> &a, const QList<QDeclarativeGeoMapParameter *> &b)
-{
- if (a.size() != b.size())
- return false;
- if (a != b) {
- for (qsizetype i = 0; i < a.size(); ++i) {
- if (! (*a.at(i) == *b.at(i)))
- return false;
- }
- }
- return true;
-}
-
static int findWaypoint(const QList<QDeclarativeGeoWaypoint *> &waypoints, const QDeclarativeGeoWaypoint *w)
{
for (qsizetype i = waypoints.size() - 1; i >= 0; --i) {
@@ -94,14 +80,6 @@ static QList<QGeoCoordinate> waypointCoordinates(const QList<QDeclarativeGeoWayp
return res;
}
-static QList<QVariantMap> waypointMetadata(const QList<QDeclarativeGeoWaypoint *> &waypoints)
-{
- QList<QVariantMap> res;
- for (QDeclarativeGeoWaypoint *w: waypoints)
- res << w->metadata();
- return res;
-}
-
/*!
\qmltype RouteModel
\instantiates QDeclarativeGeoRouteModel
@@ -740,11 +718,9 @@ QDeclarativeGeoRouteQuery::QDeclarativeGeoRouteQuery(const QGeoRouteRequest &req
// Extra params assumed to be already set in the request.
// Init waypoints
const QList<QGeoCoordinate> wpts = request_.waypoints();
- const QList<QVariantMap> meta = request_.waypointsMetadata();
for (int i = 0; i < wpts.size(); ++i) {
QDeclarativeGeoWaypoint *w = new QDeclarativeGeoWaypoint(this);
w->setCoordinate(wpts.at(i));
- w->setMetadata(meta.at(i));
m_waypoints << w;
}
}
@@ -1456,20 +1432,10 @@ void QDeclarativeGeoRouteQuery::setRouteOptimizations(QDeclarativeGeoRouteQuery:
*/
QGeoRouteRequest QDeclarativeGeoRouteQuery::routeRequest() const
{
- if (m_extraParametersChanged) {
- m_extraParametersChanged = false;
- // Update extra params into request
- const QList<QDeclarativeGeoMapParameter *> params = quickChildren<QDeclarativeGeoMapParameter>();
- QVariantMap extraParameters;
- for (const QDeclarativeGeoMapParameter *p: params)
- extraParameters[p->type()] = p->toVariantMap();
- request_.setExtraParameters(extraParameters);
- }
if (m_waypointsChanged) {
m_waypointsChanged = false;
// Update waypoints and metadata into request
request_.setWaypoints(waypointCoordinates(m_waypoints));
- request_.setWaypointsMetadata(waypointMetadata(m_waypoints));
}
return request_;
}
@@ -1498,15 +1464,6 @@ void QDeclarativeGeoRouteQuery::excludedAreaCoordinateChanged()
}
}
-void QDeclarativeGeoRouteQuery::extraParameterChanged()
-{
- m_extraParametersChanged = true;
- if (complete_) {
- emit extraParametersChanged();
- emit queryDetailsChanged();
- }
-}
-
void QDeclarativeGeoRouteQuery::waypointChanged()
{
m_waypointsChanged = true;
@@ -1516,59 +1473,6 @@ void QDeclarativeGeoRouteQuery::waypointChanged()
}
}
-void QDeclarativeGeoRouteQuery::append(QQmlListProperty<QObject> *p, QObject *v)
-{
- QDeclarativeGeoRouteQuery *query = static_cast<QDeclarativeGeoRouteQuery*>(p->object);
- query->m_children.append(v);
-
- QDeclarativeGeoMapParameter *param = qobject_cast<QDeclarativeGeoMapParameter *>(v);
- if (param) {
- query->m_extraParametersChanged = true;
- query->connect(param, &QGeoMapParameter::propertyUpdated,
- query, &QDeclarativeGeoRouteQuery::extraParameterChanged);
- if (query->complete_) {
- emit query->extraParametersChanged();
- emit query->queryDetailsChanged();
- }
- }
-}
-
-qsizetype QDeclarativeGeoRouteQuery::count(QQmlListProperty<QObject> *p)
-{
- return static_cast<QDeclarativeGeoRouteQuery*>(p->object)->m_children.count();
-}
-
-QObject *QDeclarativeGeoRouteQuery::at(QQmlListProperty<QObject> *p, qsizetype idx)
-{
- return static_cast<QDeclarativeGeoRouteQuery*>(p->object)->m_children.at(idx);
-}
-
-void QDeclarativeGeoRouteQuery::clear(QQmlListProperty<QObject> *p)
-{
- QDeclarativeGeoRouteQuery *query = static_cast<QDeclarativeGeoRouteQuery*>(p->object);
- for (auto kid : qAsConst(query->m_children)) {
- auto val = qobject_cast<QDeclarativeGeoMapParameter *>(kid);
- if (val) {
- val->disconnect(val, nullptr, query, nullptr);
- query->m_extraParametersChanged = true;
- }
- }
- query->m_children.clear();
- if (query->m_extraParametersChanged && query->complete_) {
- emit query->extraParametersChanged();
- emit query->queryDetailsChanged();
- }
-}
-
-QQmlListProperty<QObject> QDeclarativeGeoRouteQuery::declarativeChildren()
-{
- return QQmlListProperty<QObject>(this, nullptr,
- &QDeclarativeGeoRouteQuery::append,
- &QDeclarativeGeoRouteQuery::count,
- &QDeclarativeGeoRouteQuery::at,
- &QDeclarativeGeoRouteQuery::clear);
-}
-
void QDeclarativeGeoRouteQuery::doCoordinateChanged()
{
m_excludedAreaCoordinateChanged = false;
@@ -1678,12 +1582,8 @@ QDeclarativeGeoWaypoint::~QDeclarativeGeoWaypoint()
bool QDeclarativeGeoWaypoint::operator==(const QDeclarativeGeoWaypoint &other) const
{
- const QList<QDeclarativeGeoMapParameter *> params = quickChildren<QDeclarativeGeoMapParameter>();
- const QList<QDeclarativeGeoMapParameter *> otherParams = other.quickChildren<QDeclarativeGeoMapParameter>();
-
return coordinate() == other.coordinate() &&
- compareFloats(m_bearing, other.bearing()) &&
- compareParameterList(params, otherParams);
+ compareFloats(m_bearing, other.bearing());
}
/*!
@@ -1801,103 +1701,10 @@ void QDeclarativeGeoWaypoint::setBearing(qreal bearing)
m_bearing = bearing;
// Bearing is actually packed into QGeoRouteRequest::waypointMetadata() together with the extra parameters
- m_metadataChanged = true;
if (m_complete) {
emit bearingChanged();
emit waypointDetailsChanged();
}
}
-/*!
- \qmlproperty VariantMap Waypoint::metadata
- \readonly
-
- The waypoint metadata. This property is read only. If the waypoint is
- defined by the user, these can be set by using MapParameters.
- If the waypoint comes from the engine via signals, or as part of a read-only route query,
- the waypoint is intended to be read-only.
-*/
-QVariantMap QDeclarativeGeoWaypoint::metadata()
-{
- if (m_metadataChanged) {
- m_metadataChanged = false;
- m_metadata.clear();
- // Update metadata
- const QList<QDeclarativeGeoMapParameter *> params = quickChildren<QDeclarativeGeoMapParameter>();
- QVariantMap extraParameters;
- for (const QDeclarativeGeoMapParameter *p: params)
- extraParameters[p->type()] = p->toVariantMap();
- m_metadata[QStringLiteral("extra")] = extraParameters;
- m_metadata[QStringLiteral("bearing")] = m_bearing;
- }
- return m_metadata;
-}
-
-// Used only by QDeclarativeGeoRouteRequest
-void QDeclarativeGeoWaypoint::setMetadata(const QVariantMap &meta)
-{
- m_metadata = meta;
- if (m_metadata.contains(QStringLiteral("bearing")) && m_metadata.value(QStringLiteral("bearing")).canConvert<double>())
- m_bearing = m_metadata.value(QStringLiteral("bearing")).toDouble();
- m_metadataChanged = false;
-}
-
-void QDeclarativeGeoWaypoint::extraParameterChanged()
-{
- m_metadataChanged = true;
- if (m_complete) {
- emit extraParametersChanged();
- emit waypointDetailsChanged();
- }
-}
-
-void QDeclarativeGeoWaypoint::append(QQmlListProperty<QObject> *p, QObject *v)
-{
- QDeclarativeGeoWaypoint *waypoint = static_cast<QDeclarativeGeoWaypoint*>(p->object);
- waypoint->m_children.append(v);
-
- QDeclarativeGeoMapParameter *param = qobject_cast<QDeclarativeGeoMapParameter *>(v);
- if (param) {
- waypoint->connect(param, &QGeoMapParameter::propertyUpdated,
- waypoint, &QDeclarativeGeoWaypoint::extraParameterChanged);
- waypoint->extraParameterChanged();
- }
-}
-
-qsizetype QDeclarativeGeoWaypoint::count(QQmlListProperty<QObject> *p)
-{
- return static_cast<QDeclarativeGeoWaypoint*>(p->object)->m_children.count();
-}
-
-QObject *QDeclarativeGeoWaypoint::at(QQmlListProperty<QObject> *p, qsizetype idx)
-{
- return static_cast<QDeclarativeGeoWaypoint*>(p->object)->m_children.at(idx);
-}
-
-void QDeclarativeGeoWaypoint::clear(QQmlListProperty<QObject> *p)
-{
- QDeclarativeGeoWaypoint *waypoint = static_cast<QDeclarativeGeoWaypoint*>(p->object);
- for (auto kid : qAsConst(waypoint->m_children)) {
- auto val = qobject_cast<QDeclarativeGeoMapParameter *>(kid);
- if (val) {
- val->disconnect(waypoint);
- waypoint->m_metadataChanged = true;
- }
- }
- waypoint->m_children.clear();
- if (waypoint->m_metadataChanged && waypoint->m_complete) {
- emit waypoint->extraParametersChanged();
- emit waypoint->waypointDetailsChanged();
- }
-}
-
-QQmlListProperty<QObject> QDeclarativeGeoWaypoint::declarativeChildren()
-{
- return QQmlListProperty<QObject>(this, nullptr,
- &QDeclarativeGeoWaypoint::append,
- &QDeclarativeGeoWaypoint::count,
- &QDeclarativeGeoWaypoint::at,
- &QDeclarativeGeoWaypoint::clear);
-}
-
QT_END_NAMESPACE
diff --git a/src/location/declarativemaps/qdeclarativegeoroutemodel_p.h b/src/location/declarativemaps/qdeclarativegeoroutemodel_p.h
index ed5daa4b..3c0900ff 100644
--- a/src/location/declarativemaps/qdeclarativegeoroutemodel_p.h
+++ b/src/location/declarativemaps/qdeclarativegeoroutemodel_p.h
@@ -203,9 +203,6 @@ class Q_LOCATION_PRIVATE_EXPORT QDeclarativeGeoWaypoint : public QGeoCoordinateO
Q_PROPERTY(bool isValid READ isValid STORED false)
Q_PROPERTY(qreal bearing READ bearing WRITE setBearing NOTIFY bearingChanged)
- Q_PROPERTY(QVariantMap metadata READ metadata)
- Q_PROPERTY(QQmlListProperty<QObject> quickChildren READ declarativeChildren DESIGNABLE false)
- Q_CLASSINFO("DefaultProperty", "quickChildren")
Q_INTERFACES(QQmlParserStatus)
public:
@@ -228,49 +225,20 @@ public:
qreal bearing() const;
void setBearing(qreal bearing);
- template <typename T = QObject>
- QList<T*> quickChildren() const
- {
- QList<T*> res;
- for (auto kid : qAsConst(m_children)) {
- auto val = qobject_cast<T*>(kid);
- if (val)
- res.push_back(val);
- }
- return res;
- }
-
- QVariantMap metadata();
- void setMetadata(const QVariantMap &meta);
-
Q_SIGNALS:
void completed();
void waypointDetailsChanged();
void bearingChanged();
- void extraParametersChanged();
-
-private Q_SLOTS:
- void extraParameterChanged();
protected:
// From QQmlParserStatus
void classBegin() override {}
void componentComplete() override { m_complete = true; emit completed(); }
- // For quickChildren
- static void append(QQmlListProperty<QObject> *p, QObject *v);
- static qsizetype count(QQmlListProperty<QObject> *p);
- static QObject *at(QQmlListProperty<QObject> *p, qsizetype idx);
- static void clear(QQmlListProperty<QObject> *p);
- QQmlListProperty<QObject> declarativeChildren();
- QList<QObject*> m_children;
-
// other data members
- bool m_metadataChanged = false;
bool m_complete = false;
qreal m_bearing = Q_QNAN;
- QVariantMap m_metadata;
};
@@ -302,8 +270,6 @@ class Q_LOCATION_PRIVATE_EXPORT QDeclarativeGeoRouteQuery : public QObject, publ
Q_PROPERTY(QList<int> featureTypes READ featureTypes NOTIFY featureTypesChanged)
Q_PROPERTY(QVariantMap extraParameters READ extraParameters REVISION(5, 11))
Q_PROPERTY(QDateTime departureTime READ departureTime WRITE setDepartureTime NOTIFY departureTimeChanged REVISION(5, 13))
- Q_PROPERTY(QQmlListProperty<QObject> quickChildren READ declarativeChildren DESIGNABLE false)
- Q_CLASSINFO("DefaultProperty", "quickChildren")
Q_INTERFACES(QQmlParserStatus)
public:
@@ -417,18 +383,6 @@ public:
void setDepartureTime(const QDateTime &departureTime);
QDateTime departureTime() const;
- template <typename T = QObject>
- QList<T*> quickChildren() const
- {
- QList<T*> res;
- for (auto kid : qAsConst(m_children)) {
- auto val = qobject_cast<T*>(kid);
- if (val)
- res.push_back(val);
- }
- return res;
- }
-
Q_SIGNALS:
void numberAlternativeRoutesChanged();
void travelModesChanged();
@@ -447,25 +401,14 @@ Q_SIGNALS:
private Q_SLOTS:
void excludedAreaCoordinateChanged();
- void extraParameterChanged();
void waypointChanged();
-protected:
- static void append(QQmlListProperty<QObject> *p, QObject *v);
- static qsizetype count(QQmlListProperty<QObject> *p);
- static QObject *at(QQmlListProperty<QObject> *p, qsizetype idx);
- static void clear(QQmlListProperty<QObject> *p);
-
- QQmlListProperty<QObject> declarativeChildren();
- QList<QObject*> m_children;
-
private:
Q_INVOKABLE void doCoordinateChanged();
mutable QGeoRouteRequest request_;
bool complete_ = false;
bool m_excludedAreaCoordinateChanged = false;
- mutable bool m_extraParametersChanged = false;
mutable bool m_waypointsChanged = false;
QList<QDeclarativeGeoWaypoint *> m_waypoints;
};
diff --git a/src/location/maps/qgeomap.cpp b/src/location/maps/qgeomap.cpp
index 54ba9bbb..1dafbe1b 100644
--- a/src/location/maps/qgeomap.cpp
+++ b/src/location/maps/qgeomap.cpp
@@ -54,7 +54,6 @@ QGeoMap::QGeoMap(QGeoMapPrivate &dd, QObject *parent)
QGeoMap::~QGeoMap()
{
- clearParameters();
}
void QGeoMap::setViewportSize(const QSize& size)
@@ -225,32 +224,6 @@ void QGeoMap::clearData()
}
-void QGeoMap::addParameter(QGeoMapParameter *param)
-{
- Q_D(QGeoMap);
- if (param && !d->m_mapParameters.contains(param)) {
- d->m_mapParameters.append(param);
- d->addParameter(param);
- }
-}
-
-void QGeoMap::removeParameter(QGeoMapParameter *param)
-{
- Q_D(QGeoMap);
- if (param && d->m_mapParameters.contains(param)) {
- d->removeParameter(param);
- d->m_mapParameters.removeOne(param);
- }
-}
-
-void QGeoMap::clearParameters()
-{
- Q_D(QGeoMap);
- for (QGeoMapParameter *p : qAsConst(d->m_mapParameters))
- d->removeParameter(p);
- d->m_mapParameters.clear();
-}
-
QGeoMap::ItemTypes QGeoMap::supportedMapItemTypes() const
{
Q_D(const QGeoMap);
@@ -363,16 +336,6 @@ const QGeoMapPrivate *QGeoMapPrivate::get(const QGeoMap &map)
return map.d_func();
}
-void QGeoMapPrivate::addParameter(QGeoMapParameter *param)
-{
- Q_UNUSED(param);
-}
-
-void QGeoMapPrivate::removeParameter(QGeoMapParameter *param)
-{
- Q_UNUSED(param);
-}
-
QGeoMap::ItemTypes QGeoMapPrivate::supportedMapItemTypes() const
{
return QGeoMap::NoItem;
diff --git a/src/location/maps/qgeomap_p.h b/src/location/maps/qgeomap_p.h
index e51c4900..0a7b76b1 100644
--- a/src/location/maps/qgeomap_p.h
+++ b/src/location/maps/qgeomap_p.h
@@ -68,7 +68,6 @@ class QGeoShape;
class QGeoRectangle;
class QSGNode;
class QQuickWindow;
-class QGeoMapParameter;
class QDeclarativeGeoMapItemBase;
class QDeclarativeGeoMap;
@@ -133,10 +132,6 @@ public:
virtual void prefetchData();
virtual void clearData();
- void addParameter(QGeoMapParameter *param);
- void removeParameter(QGeoMapParameter *param);
- void clearParameters();
-
ItemTypes supportedMapItemTypes() const;
void addMapItem(QDeclarativeGeoMapItemBase *item);
diff --git a/src/location/maps/qgeomap_p_p.h b/src/location/maps/qgeomap_p_p.h
index 0a986343..ca2e4362 100644
--- a/src/location/maps/qgeomap_p_p.h
+++ b/src/location/maps/qgeomap_p_p.h
@@ -67,7 +67,6 @@ QT_BEGIN_NAMESPACE
class QGeoMappingManagerEngine;
class QGeoMap;
class QGeoMapController;
-class QGeoMapParameter;
class QDeclarativeGeoMapItemBase;
class Q_LOCATION_PRIVATE_EXPORT QGeoMapPrivate : public QObjectPrivate
@@ -85,9 +84,6 @@ public:
protected:
/* Hooks into the actual map implementations */
- virtual void addParameter(QGeoMapParameter *param);
- virtual void removeParameter(QGeoMapParameter *param);
-
virtual QGeoMap::ItemTypes supportedMapItemTypes() const;
virtual void addMapItem(QDeclarativeGeoMapItemBase *item);
virtual void removeMapItem(QDeclarativeGeoMapItemBase *item);
@@ -119,7 +115,6 @@ protected:
QPointer<QGeoMappingManagerEngine> m_engine;
QGeoCameraData m_cameraData;
QGeoMapType m_activeMapType;
- QList<QGeoMapParameter *> m_mapParameters;
QList<QDeclarativeGeoMapItemBase *> m_mapItems;
QGeoCameraCapabilities m_cameraCapabilities;
bool m_copyrightVisible = true;
diff --git a/src/location/maps/qgeomapparameter.cpp b/src/location/maps/qgeomapparameter.cpp
deleted file mode 100644
index 7b47a541..00000000
--- a/src/location/maps/qgeomapparameter.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2022 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtLocation module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#include "qgeomapparameter_p.h"
-#include <QtCore/QVariant>
-#include <QDebug>
-#include <QMetaProperty>
-
-QT_BEGIN_NAMESPACE
-
-QGeoMapParameter::QGeoMapParameter(QObject *parent) : QObject(parent)
-{
-
-}
-
-QGeoMapParameter::~QGeoMapParameter()
-{
-}
-
-bool QGeoMapParameter::operator==(const QGeoMapParameter &other) const
-{
- return (other.toVariantMap() == toVariantMap());
-}
-
-QString QGeoMapParameter::type() const
-{
- return m_type;
-}
-
-void QGeoMapParameter::setType(const QString &type)
-{
- if (m_type.isEmpty())
- m_type = type;
-}
-
-// DO NOT USE to set "type"
-void QGeoMapParameter::updateProperty(const char *propertyName, QVariant value)
-{
- const QMetaProperty property = metaObject()->property(metaObject()->indexOfProperty(propertyName));
- property.write(this, value);
- // This should technically be emitted only for dynamically added properties.
- // Since this object has only type defined as Q_PROPERTY() which is a set-once
- // no check is really needed here.
- emit propertyUpdated(this, property);
-}
-
-QVariantMap QGeoMapParameter::toVariantMap() const
-{
- QVariantMap res;
- const QMetaObject *metaObj = metaObject();
- // 0 is objectName, 1 is type, we want to skip both of them here.
- for (int i = m_initialPropertyCount; i < metaObj->propertyCount(); ++i) {
- const char *propName = metaObj->property(i).name();
- res[QLatin1String(propName)] = property(propName);
- }
- return res;
-}
-
-bool QGeoMapParameter::hasProperty(const char *propertyName) const
-{
- return metaObject()->indexOfProperty(propertyName) != -1
- || dynamicPropertyNames().indexOf(QByteArray(propertyName)) != -1;
-}
-
-QT_END_NAMESPACE
-
diff --git a/src/location/maps/qgeomapparameter_p.h b/src/location/maps/qgeomapparameter_p.h
deleted file mode 100644
index 5be1b9e0..00000000
--- a/src/location/maps/qgeomapparameter_p.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2022 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtLocation module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#ifndef QGEOMAPPARAMETER_P_H
-#define QGEOMAPPARAMETER_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QObject>
-#include <QString>
-#include <QtLocation/private/qlocationglobal_p.h>
-
-QT_BEGIN_NAMESPACE
-
-class Q_LOCATION_PRIVATE_EXPORT QGeoMapParameter : public QObject
-{
- Q_OBJECT
-
- Q_PROPERTY(QString type READ type WRITE setType)
-public:
- explicit QGeoMapParameter(QObject *parent = nullptr);
- ~QGeoMapParameter();
-
- bool operator==(const QGeoMapParameter &other) const;
-
- QString type() const;
- void setType(const QString &type);
-
- void updateProperty(const char *propertyName, QVariant value);
-
- QVariantMap toVariantMap() const;
- bool hasProperty(const char *propertyName) const;
-
-Q_SIGNALS:
- void propertyUpdated(QGeoMapParameter *param, const QMetaProperty &property);
-
-protected:
- QString m_type;
- const int m_initialPropertyCount = staticMetaObject.propertyCount();
-
- Q_DISABLE_COPY(QGeoMapParameter)
- friend class QGeoMap;
-};
-
-QT_END_NAMESPACE
-
-#endif // QGEOMAPPARAMETER_P_H
diff --git a/src/location/maps/qgeorouteparserosrmv5.cpp b/src/location/maps/qgeorouteparserosrmv5.cpp
index 43c5c1e6..5d822491 100644
--- a/src/location/maps/qgeorouteparserosrmv5.cpp
+++ b/src/location/maps/qgeorouteparserosrmv5.cpp
@@ -1028,25 +1028,12 @@ QUrl QGeoRouteParserOsrmV5Private::requestUrl(const QGeoRouteRequest &request, c
{
QString routingUrl = prefix;
int notFirst = 0;
- QString bearings;
- const QList<QVariantMap> metadata = request.waypointsMetadata();
const QList<QGeoCoordinate> waypoints = request.waypoints();
for (qsizetype i = 0; i < waypoints.size(); i++) {
const QGeoCoordinate &c = waypoints.at(i);
- if (notFirst) {
+ if (notFirst)
routingUrl.append(QLatin1Char(';'));
- bearings.append(QLatin1Char(';'));
- }
routingUrl.append(QString::number(c.longitude(), 'f', 7)).append(QLatin1Char(',')).append(QString::number(c.latitude(), 'f', 7));
- if (metadata.size() > i) {
- const QVariantMap &meta = metadata.at(i);
- if (meta.contains(QLatin1String("bearing"))) {
- qreal bearing = meta.value(QLatin1String("bearing")).toDouble();
- bearings.append(QString::number(int(bearing))).append(QLatin1Char(',')).append(QLatin1String("90")); // 90 is the angle of maneuver allowed.
- } else {
- bearings.append(QLatin1String("0,180")); // 180 here means anywhere
- }
- }
++notFirst;
}
@@ -1056,7 +1043,6 @@ QUrl QGeoRouteParserOsrmV5Private::requestUrl(const QGeoRouteRequest &request, c
query.addQueryItem(QLatin1String("steps"), QLatin1String("true"));
query.addQueryItem(QLatin1String("geometries"), QLatin1String("polyline6"));
query.addQueryItem(QLatin1String("alternatives"), QLatin1String("true"));
- query.addQueryItem(QLatin1String("bearings"), bearings);
if (m_extension)
m_extension->updateQuery(query);
url.setQuery(query);
diff --git a/src/location/maps/qgeorouterequest.cpp b/src/location/maps/qgeorouterequest.cpp
index 404ed0a4..2f574809 100644
--- a/src/location/maps/qgeorouterequest.cpp
+++ b/src/location/maps/qgeorouterequest.cpp
@@ -305,27 +305,6 @@ QList<QGeoCoordinate> QGeoRouteRequest::waypoints() const
}
/*!
- Sets \a waypointMetadata as the metadata for the waypoints set in this request.
- The metadata are intended as one QVariantMap per waypoint, given in the same order as
- the waypoints.
-
- The content of the QVariantMap is somehow backend-specific, but properties that can be specified using
- \l Waypoint elements in QML can be assumed to be named and to work the same way across plugins, where supported.
-*/
-void QGeoRouteRequest::setWaypointsMetadata(const QList<QVariantMap> &waypointMetadata)
-{
- d_ptr->waypointMetadata = waypointMetadata;
-}
-
-/*!
- Returns the metadata for the waypoints in this request.
-*/
-QList<QVariantMap> QGeoRouteRequest::waypointsMetadata() const
-{
- return d_ptr->waypointMetadata;
-}
-
-/*!
Sets \a areas as excluded areas that the route must not cross.
*/
void QGeoRouteRequest::setExcludeAreas(const QList<QGeoRectangle> &areas)
@@ -527,7 +506,6 @@ QVariantMap QGeoRouteRequest::extraParameters() const
bool QGeoRouteRequestPrivate::operator==(const QGeoRouteRequestPrivate &other) const
{
return ((waypoints == other.waypoints)
- && (waypointMetadata == other.waypointMetadata)
&& (excludeAreas == other.excludeAreas)
&& (numberAlternativeRoutes == other.numberAlternativeRoutes)
&& (travelModes == other.travelModes)
diff --git a/src/location/maps/qgeorouterequest.h b/src/location/maps/qgeorouterequest.h
index 79af9f72..45b0bc52 100644
--- a/src/location/maps/qgeorouterequest.h
+++ b/src/location/maps/qgeorouterequest.h
@@ -135,9 +135,6 @@ public:
void setWaypoints(const QList<QGeoCoordinate> &waypoints);
QList<QGeoCoordinate> waypoints() const;
- void setWaypointsMetadata(const QList<QVariantMap> &waypointMetadata);
- QList<QVariantMap> waypointsMetadata() const;
-
void setExcludeAreas(const QList<QGeoRectangle> &areas);
QList<QGeoRectangle> excludeAreas() const;
diff --git a/src/location/maps/qgeorouterequest_p.h b/src/location/maps/qgeorouterequest_p.h
index 77ddd262..b74283fc 100644
--- a/src/location/maps/qgeorouterequest_p.h
+++ b/src/location/maps/qgeorouterequest_p.h
@@ -67,7 +67,6 @@ public:
bool operator==(const QGeoRouteRequestPrivate &other) const;
QList<QGeoCoordinate> waypoints;
- QList<QVariantMap> waypointMetadata;
QList<QGeoRectangle> excludeAreas;
int numberAlternativeRoutes = 0;
QGeoRouteRequest::TravelModes travelModes = QGeoRouteRequest::CarTravel;
diff --git a/src/location/quickmapitems/qdeclarativegeomap.cpp b/src/location/quickmapitems/qdeclarativegeomap.cpp
index 475f5279..c80ee430 100644
--- a/src/location/quickmapitems/qdeclarativegeomap.cpp
+++ b/src/location/quickmapitems/qdeclarativegeomap.cpp
@@ -44,7 +44,6 @@
#include "qgeomappingmanager_p.h"
#include "qgeocameracapabilities_p.h"
#include "qgeomap_p.h"
-#include "qdeclarativegeomapparameter_p.h"
#include "qgeoprojection_p.h"
#include <QtPositioning/QGeoCircle>
#include <QtPositioning/QGeoRectangle>
@@ -214,9 +213,8 @@ QDeclarativeGeoMap::QDeclarativeGeoMap(QQuickItem *parent)
QDeclarativeGeoMap::~QDeclarativeGeoMap()
{
- // Removing map parameters and map items from m_map
+ // Removing map items from m_map
if (m_map) {
- m_map->clearParameters();
m_map->clearMapItems();
}
@@ -388,7 +386,6 @@ void QDeclarativeGeoMap::pluginReady()
void QDeclarativeGeoMap::componentComplete()
{
m_componentCompleted = true;
- populateParameters();
populateMap();
QQuickItem::componentComplete();
}
@@ -423,18 +420,6 @@ void QDeclarativeGeoMap::populateMap()
}
}
-void QDeclarativeGeoMap::populateParameters()
-{
- QObjectList kids = children();
- const QList<QQuickItem *> quickKids = childItems();
- for (const auto &quickKid : quickKids)
- kids.append(quickKid);
- for (auto *kid : qAsConst(kids)) {
- if (auto *mapParameter = qobject_cast<QDeclarativeGeoMapParameter *>(kid))
- addMapParameter(mapParameter);
- }
-}
-
/*!
\internal
*/
@@ -678,12 +663,6 @@ void QDeclarativeGeoMap::mappingManagerInitialized()
// DO NOT need to have setMap called again on their children map items
// because they have been added to m_mapItems, which is processed right above.
-
- // All map parameters that were added before the plugin was ready
- // need to be added to m_map
- for (QDeclarativeGeoMapParameter *p : qAsConst(m_mapParameters))
- m_map->addParameter(p);
-
if (m_initialized)
update();
}
@@ -1755,95 +1734,6 @@ void QDeclarativeGeoMap::onCameraDataChanged(const QGeoCameraData &cameraData)
}
/*!
- \qmlmethod void QtLocation::Map::addMapParameter(MapParameter parameter)
-
- Adds the \a parameter object to the map. The effect of this call is dependent
- on the combination of the content of the MapParameter and the type of
- underlying QGeoMap. If a MapParameter that is not supported by the underlying
- QGeoMap gets added, the call has no effect.
-
- The release of this API with Qt 5.9 is a Technology Preview.
-
- \sa MapParameter, removeMapParameter, mapParameters, clearMapParameters
-
- \since 5.9
-*/
-void QDeclarativeGeoMap::addMapParameter(QDeclarativeGeoMapParameter *parameter)
-{
- if (!parameter->isComponentComplete()) {
- connect(parameter, &QDeclarativeGeoMapParameter::completed, this, &QDeclarativeGeoMap::addMapParameter);
- return;
- }
-
- disconnect(parameter);
- if (m_mapParameters.contains(parameter))
- return;
- parameter->setParent(this);
- m_mapParameters.append(parameter); // parameter now owned by QDeclarativeGeoMap
- if (m_map)
- m_map->addParameter(parameter);
-}
-
-/*!
- \qmlmethod void QtLocation::Map::removeMapParameter(MapParameter parameter)
-
- Removes the given \a parameter object from the map.
-
- The release of this API with Qt 5.9 is a Technology Preview.
-
- \sa MapParameter, addMapParameter, mapParameters, clearMapParameters
-
- \since 5.9
-*/
-void QDeclarativeGeoMap::removeMapParameter(QDeclarativeGeoMapParameter *parameter)
-{
- if (!m_mapParameters.contains(parameter))
- return;
- if (m_map)
- m_map->removeParameter(parameter);
- m_mapParameters.removeOne(parameter);
-}
-
-/*!
- \qmlmethod void QtLocation::Map::clearMapParameters()
-
- Removes all map parameters from the map.
-
- The release of this API with Qt 5.9 is a Technology Preview.
-
- \sa MapParameter, mapParameters, addMapParameter, removeMapParameter, clearMapParameters
-
- \since 5.9
-*/
-void QDeclarativeGeoMap::clearMapParameters()
-{
- if (m_map)
- m_map->clearParameters();
- m_mapParameters.clear();
-}
-
-/*!
- \qmlproperty list<MapParameters> QtLocation::Map::mapParameters
-
- Returns the list of all map parameters in no particular order.
- These items include map parameters that were declared statically as part of
- the type declaration, as well as dynamical map parameters (\l addMapParameter).
-
- The release of this API with Qt 5.9 is a Technology Preview.
-
- \sa MapParameter, addMapParameter, removeMapParameter, clearMapParameters
-
- \since 5.9
-*/
-QList<QObject *> QDeclarativeGeoMap::mapParameters()
-{
- QList<QObject *> ret;
- for (QDeclarativeGeoMapParameter *p : qAsConst(m_mapParameters))
- ret << p;
- return ret;
-}
-
-/*!
\qmlproperty list<MapItem> QtLocation::Map::mapItems
Returns the list of all map items in no particular order.
diff --git a/src/location/quickmapitems/qdeclarativegeomap_p.h b/src/location/quickmapitems/qdeclarativegeomap_p.h
index 7875b3fd..233dd07a 100644
--- a/src/location/quickmapitems/qdeclarativegeomap_p.h
+++ b/src/location/quickmapitems/qdeclarativegeomap_p.h
@@ -73,7 +73,6 @@ class QQuickWindow;
class QDeclarativeGeoServiceProvider;
class QGeoMapType;
class QDeclarativeGeoMapCopyrightNotice;
-class QDeclarativeGeoMapParameter;
class Q_LOCATION_PRIVATE_EXPORT QDeclarativeGeoMap : public QQuickItem
{
@@ -101,7 +100,6 @@ class Q_LOCATION_PRIVATE_EXPORT QDeclarativeGeoMap : public QQuickItem
Q_PROPERTY(QList<QGeoMapType> supportedMapTypes READ supportedMapTypes NOTIFY supportedMapTypesChanged)
Q_PROPERTY(QGeoCoordinate center READ center WRITE setCenter NOTIFY centerChanged)
Q_PROPERTY(QList<QObject *> mapItems READ mapItems NOTIFY mapItemsChanged)
- Q_PROPERTY(QList<QObject *> mapParameters READ mapParameters)
Q_PROPERTY(QGeoServiceProvider::Error error READ error NOTIFY errorChanged)
Q_PROPERTY(QString errorString READ errorString NOTIFY errorChanged)
Q_PROPERTY(QGeoShape visibleRegion READ visibleRegion WRITE setVisibleRegion NOTIFY visibleRegionChanged)
@@ -184,11 +182,6 @@ public:
Q_INVOKABLE void clearMapItems();
QList<QObject *> mapItems();
- Q_INVOKABLE void addMapParameter(QDeclarativeGeoMapParameter *parameter);
- Q_INVOKABLE void removeMapParameter(QDeclarativeGeoMapParameter *parameter);
- Q_INVOKABLE void clearMapParameters();
- QList<QObject *> mapParameters();
-
Q_INVOKABLE QGeoCoordinate toCoordinate(const QPointF &position, bool clipToViewPort = true) const;
Q_INVOKABLE QPointF fromCoordinate(const QGeoCoordinate &coordinate, bool clipToViewPort = true) const;
@@ -280,7 +273,6 @@ private Q_SLOTS:
private:
void setupMapView(QDeclarativeGeoMapItemView *view);
void populateMap();
- void populateParameters();
void fitViewportToMapItemsRefine(const QList<QPointer<QDeclarativeGeoMapItemBase> > &mapItems, bool refine, bool onlyVisible);
bool isInteractive() const;
void attachCopyrightNotice(bool initialVisibility);
@@ -311,7 +303,6 @@ private:
double m_minimumViewportLatitude = 0.0;
bool m_initialized = false;
bool m_sgNodeHasChanged = false;
- QList<QDeclarativeGeoMapParameter *> m_mapParameters;
QGeoCameraCapabilities m_cameraCapabilities;
qreal m_userMinimumZoomLevel = Q_QNAN;
qreal m_userMaximumZoomLevel = Q_QNAN;
diff --git a/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp b/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp
index e00369a7..95e53581 100644
--- a/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp
+++ b/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp
@@ -52,7 +52,6 @@
#include <QtLocation/private/qdeclarativepolygonmapitem_p.h>
#include <QtLocation/private/qdeclarativepolylinemapitem_p.h>
#include <QtLocation/private/qdeclarativerectanglemapitem_p.h>
-#include <QtLocation/private/qgeomapparameter_p.h>
#include <QtLocation/private/qgeoprojection_p.h>
#include <QtQuick/QQuickWindow>
#include <QtQuick/QSGImageNode>
@@ -177,31 +176,6 @@ QSGNode *QGeoMapMapboxGLPrivate::updateSceneGraph(QSGNode *node, QQuickWindow *w
return node;
}
-void QGeoMapMapboxGLPrivate::addParameter(QGeoMapParameter *param)
-{
- Q_Q(QGeoMapMapboxGL);
-
- QObject::connect(param, &QGeoMapParameter::propertyUpdated, q,
- &QGeoMapMapboxGL::onParameterPropertyUpdated);
-
- if (m_styleLoaded) {
- m_styleChanges << QMapboxGLStyleChange::addMapParameter(param);
- emit q->sgNodeChanged();
- }
-}
-
-void QGeoMapMapboxGLPrivate::removeParameter(QGeoMapParameter *param)
-{
- Q_Q(QGeoMapMapboxGL);
-
- q->disconnect(param);
-
- if (m_styleLoaded) {
- m_styleChanges << QMapboxGLStyleChange::removeMapParameter(param);
- emit q->sgNodeChanged();
- }
-}
-
QGeoMap::ItemTypes QGeoMapMapboxGLPrivate::supportedMapItemTypes() const
{
return QGeoMap::MapRectangle | QGeoMap::MapCircle | QGeoMap::MapPolygon | QGeoMap::MapPolyline;
@@ -447,9 +421,6 @@ void QGeoMapMapboxGL::onMapChanged(QMapboxGL::MapChange change)
for (QDeclarativeGeoMapItemBase *item : d->m_mapItems)
d->m_styleChanges << QMapboxGLStyleChange::addMapItem(item, d->m_mapItemsBefore);
-
- for (QGeoMapParameter *param : d->m_mapParameters)
- d->m_styleChanges << QMapboxGLStyleChange::addMapParameter(param);
}
}
@@ -490,15 +461,6 @@ void QGeoMapMapboxGL::onMapItemGeometryChanged()
emit sgNodeChanged();
}
-void QGeoMapMapboxGL::onParameterPropertyUpdated(QGeoMapParameter *param)
-{
- Q_D(QGeoMapMapboxGL);
-
- d->m_styleChanges.append(QMapboxGLStyleChange::addMapParameter(param));
-
- emit sgNodeChanged();
-}
-
void QGeoMapMapboxGL::copyrightsChanged(const QString &copyrightsHtml)
{
Q_D(QGeoMapMapboxGL);
diff --git a/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.h b/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.h
index 0418adb7..2d16172f 100644
--- a/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.h
+++ b/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.h
@@ -43,7 +43,6 @@
#include "qgeomappingmanagerenginemapboxgl.h"
#include <QtLocation/private/qgeomap_p.h>
-#include <QtLocation/private/qgeomapparameter_p.h>
class QGeoMapMapboxGLPrivate;
@@ -72,9 +71,6 @@ private Q_SLOTS:
void onMapItemUnsupportedPropertyChanged();
void onMapItemGeometryChanged();
- // QGeoMapParameter
- void onParameterPropertyUpdated(QGeoMapParameter *param, const char *propertyName);
-
public Q_SLOTS:
void copyrightsChanged(const QString &copyrightsHtml);
diff --git a/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl_p.h b/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl_p.h
index 6098a5e1..3073f863 100644
--- a/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl_p.h
+++ b/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl_p.h
@@ -48,7 +48,6 @@
#include <QtCore/QVariant>
#include <QtCore/QRectF>
#include <QtLocation/private/qgeomap_p_p.h>
-#include <QtLocation/private/qgeomapparameter_p.h>
class QMapboxGL;
class QMapboxGLStyleChange;
@@ -64,9 +63,6 @@ public:
QSGNode *updateSceneGraph(QSGNode *oldNode, QQuickWindow *window);
- void addParameter(QGeoMapParameter *param) override;
- void removeParameter(QGeoMapParameter *param) override;
-
QGeoMap::ItemTypes supportedMapItemTypes() const override;
void addMapItem(QDeclarativeGeoMapItemBase *item) override;
void removeMapItem(QDeclarativeGeoMapItemBase *item) override;
diff --git a/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp b/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp
index c094d51b..97a4cf39 100644
--- a/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp
+++ b/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp
@@ -196,43 +196,6 @@ QList<QByteArray> getAllPropertyNamesList(QObject *object)
} // namespace
-// QMapboxGLStyleChange
-
-QList<QSharedPointer<QMapboxGLStyleChange>> QMapboxGLStyleChange::addMapParameter(QGeoMapParameter *param)
-{
- static const QStringList acceptedParameterTypes = QStringList()
- << QStringLiteral("paint") << QStringLiteral("layout") << QStringLiteral("filter")
- << QStringLiteral("layer") << QStringLiteral("source") << QStringLiteral("image");
-
- QList<QSharedPointer<QMapboxGLStyleChange>> changes;
-
- switch (acceptedParameterTypes.indexOf(param->type())) {
- case -1:
- qWarning() << "Invalid value for property 'type': " + param->type();
- break;
- case 0: // paint
- changes << QMapboxGLStyleSetPaintProperty::fromMapParameter(param);
- break;
- case 1: // layout
- changes << QMapboxGLStyleSetLayoutProperty::fromMapParameter(param);
- break;
- case 2: // filter
- changes << QMapboxGLStyleSetFilter::fromMapParameter(param);
- break;
- case 3: // layer
- changes << QMapboxGLStyleAddLayer::fromMapParameter(param);
- break;
- case 4: // source
- changes << QMapboxGLStyleAddSource::fromMapParameter(param);
- break;
- case 5: // image
- changes << QMapboxGLStyleAddImage::fromMapParameter(param);
- break;
- }
-
- return changes;
-}
-
QList<QSharedPointer<QMapboxGLStyleChange>> QMapboxGLStyleChange::addMapItem(QDeclarativeGeoMapItemBase *item, const QString &before)
{
QList<QSharedPointer<QMapboxGLStyleChange>> changes;
@@ -258,35 +221,6 @@ QList<QSharedPointer<QMapboxGLStyleChange>> QMapboxGLStyleChange::addMapItem(QDe
return changes;
}
-QList<QSharedPointer<QMapboxGLStyleChange>> QMapboxGLStyleChange::removeMapParameter(QGeoMapParameter *param)
-{
- static const QStringList acceptedParameterTypes = QStringList()
- << QStringLiteral("paint") << QStringLiteral("layout") << QStringLiteral("filter")
- << QStringLiteral("layer") << QStringLiteral("source") << QStringLiteral("image");
-
- QList<QSharedPointer<QMapboxGLStyleChange>> changes;
-
- switch (acceptedParameterTypes.indexOf(param->type())) {
- case -1:
- qWarning() << "Invalid value for property 'type': " + param->type();
- break;
- case 0: // paint
- case 1: // layout
- case 2: // filter
- break;
- case 3: // layer
- changes << QSharedPointer<QMapboxGLStyleChange>(new QMapboxGLStyleRemoveLayer(param->property("name").toString()));
- break;
- case 4: // source
- changes << QSharedPointer<QMapboxGLStyleChange>(new QMapboxGLStyleRemoveSource(param->property("name").toString()));
- break;
- case 5: // image
- break;
- }
-
- return changes;
-}
-
QList<QSharedPointer<QMapboxGLStyleChange>> QMapboxGLStyleChange::removeMapItem(QDeclarativeGeoMapItemBase *item)
{
QList<QSharedPointer<QMapboxGLStyleChange>> changes;
@@ -306,33 +240,6 @@ void QMapboxGLStyleSetLayoutProperty::apply(QMapboxGL *map)
map->setLayoutProperty(m_layer, m_property, m_value);
}
-QList<QSharedPointer<QMapboxGLStyleChange>> QMapboxGLStyleSetLayoutProperty::fromMapParameter(QGeoMapParameter *param)
-{
- Q_ASSERT(param->type() == "layout");
-
- QList<QSharedPointer<QMapboxGLStyleChange>> changes;
-
- QList<QByteArray> propertyNames = getAllPropertyNamesList(param);
- for (const QByteArray &propertyName : propertyNames) {
- if (isImmutableProperty(propertyName))
- continue;
-
- auto layout = new QMapboxGLStyleSetLayoutProperty();
-
- layout->m_value = param->property(propertyName);
- if (layout->m_value.canConvert<QJSValue>()) {
- layout->m_value = layout->m_value.value<QJSValue>().toVariant();
- }
-
- layout->m_layer = param->property("layer").toString();
- layout->m_property = formatPropertyName(propertyName);
-
- changes << QSharedPointer<QMapboxGLStyleChange>(layout);
- }
-
- return changes;
-}
-
QList<QSharedPointer<QMapboxGLStyleChange>> QMapboxGLStyleSetLayoutProperty::fromMapItem(QDeclarativeGeoMapItemBase *item)
{
QList<QSharedPointer<QMapboxGLStyleChange>> changes;
@@ -383,33 +290,6 @@ void QMapboxGLStyleSetPaintProperty::apply(QMapboxGL *map)
map->setPaintProperty(m_layer, m_property, m_value);
}
-QList<QSharedPointer<QMapboxGLStyleChange>> QMapboxGLStyleSetPaintProperty::fromMapParameter(QGeoMapParameter *param)
-{
- Q_ASSERT(param->type() == "paint");
-
- QList<QSharedPointer<QMapboxGLStyleChange>> changes;
-
- QList<QByteArray> propertyNames = getAllPropertyNamesList(param);
- for (const QByteArray &propertyName : propertyNames) {
- if (isImmutableProperty(propertyName))
- continue;
-
- auto paint = new QMapboxGLStyleSetPaintProperty();
-
- paint->m_value = param->property(propertyName);
- if (paint->m_value.canConvert<QJSValue>()) {
- paint->m_value = paint->m_value.value<QJSValue>().toVariant();
- }
-
- paint->m_layer = param->property("layer").toString();
- paint->m_property = formatPropertyName(propertyName);
-
- changes << QSharedPointer<QMapboxGLStyleChange>(paint);
- }
-
- return changes;
-}
-
QList<QSharedPointer<QMapboxGLStyleChange>> QMapboxGLStyleSetPaintProperty::fromMapItem(QDeclarativeGeoMapItemBase *item)
{
switch (item->itemType()) {
@@ -502,41 +382,6 @@ void QMapboxGLStyleAddLayer::apply(QMapboxGL *map)
map->addLayer(m_params, m_before);
}
-QSharedPointer<QMapboxGLStyleChange> QMapboxGLStyleAddLayer::fromMapParameter(QGeoMapParameter *param)
-{
- Q_ASSERT(param->type() == "layer");
-
- auto layer = new QMapboxGLStyleAddLayer();
-
- static const QStringList layerProperties = QStringList()
- << QStringLiteral("name") << QStringLiteral("layerType") << QStringLiteral("before");
-
- QList<QByteArray> propertyNames = getAllPropertyNamesList(param);
- for (const QByteArray &propertyName : propertyNames) {
- if (isImmutableProperty(propertyName))
- continue;
-
- const QVariant value = param->property(propertyName);
-
- switch (layerProperties.indexOf(propertyName)) {
- case -1:
- layer->m_params[formatPropertyName(propertyName)] = value;
- break;
- case 0: // name
- layer->m_params[QStringLiteral("id")] = value;
- break;
- case 1: // layerType
- layer->m_params[QStringLiteral("type")] = value;
- break;
- case 2: // before
- layer->m_before = value.toString();
- break;
- }
- }
-
- return QSharedPointer<QMapboxGLStyleChange>(layer);
-}
-
QSharedPointer<QMapboxGLStyleChange> QMapboxGLStyleAddLayer::fromFeature(const QMapbox::Feature &feature, const QString &before)
{
auto layer = new QMapboxGLStyleAddLayer();
@@ -580,47 +425,6 @@ void QMapboxGLStyleAddSource::apply(QMapboxGL *map)
map->updateSource(m_id, m_params);
}
-QSharedPointer<QMapboxGLStyleChange> QMapboxGLStyleAddSource::fromMapParameter(QGeoMapParameter *param)
-{
- Q_ASSERT(param->type() == "source");
-
- static const QStringList acceptedSourceTypes = QStringList()
- << QStringLiteral("vector") << QStringLiteral("raster") << QStringLiteral("raster-dem") << QStringLiteral("geojson") << QStringLiteral("image");
-
- QString sourceType = param->property("sourceType").toString();
-
- auto source = new QMapboxGLStyleAddSource();
- source->m_id = param->property("name").toString();
- source->m_params[QStringLiteral("type")] = sourceType;
-
- switch (acceptedSourceTypes.indexOf(sourceType)) {
- case -1:
- qWarning() << "Invalid value for property 'sourceType': " + sourceType;
- break;
- case 0: // vector
- case 1: // raster
- case 2: // raster-dem
- source->m_params[QStringLiteral("url")] = param->property("url");
- break;
- case 3: { // geojson
- auto data = param->property("data").toString();
- if (data.startsWith(':')) {
- QFile geojson(data);
- geojson.open(QIODevice::ReadOnly);
- source->m_params[QStringLiteral("data")] = geojson.readAll();
- } else {
- 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);
-}
-
QSharedPointer<QMapboxGLStyleChange> QMapboxGLStyleAddSource::fromFeature(const QMapbox::Feature &feature)
{
auto source = new QMapboxGLStyleAddSource();
@@ -657,32 +461,9 @@ void QMapboxGLStyleSetFilter::apply(QMapboxGL *map)
map->setFilter(m_layer, m_filter);
}
-QSharedPointer<QMapboxGLStyleChange> QMapboxGLStyleSetFilter::fromMapParameter(QGeoMapParameter *param)
-{
- Q_ASSERT(param->type() == "filter");
-
- auto filter = new QMapboxGLStyleSetFilter();
- filter->m_layer = param->property("layer").toString();
- filter->m_filter = param->property("filter");
-
- return QSharedPointer<QMapboxGLStyleChange>(filter);
-}
-
-
// QMapboxGLStyleAddImage
void QMapboxGLStyleAddImage::apply(QMapboxGL *map)
{
map->addImage(m_name, m_sprite);
}
-
-QSharedPointer<QMapboxGLStyleChange> QMapboxGLStyleAddImage::fromMapParameter(QGeoMapParameter *param)
-{
- Q_ASSERT(param->type() == "image");
-
- auto image = new QMapboxGLStyleAddImage();
- image->m_name = param->property("name").toString();
- image->m_sprite = QImage(param->property("sprite").toString());
-
- return QSharedPointer<QMapboxGLStyleChange>(image);
-}
diff --git a/src/plugins/geoservices/mapboxgl/qmapboxglstylechange_p.h b/src/plugins/geoservices/mapboxgl/qmapboxglstylechange_p.h
index 24b84b34..0645b7b4 100644
--- a/src/plugins/geoservices/mapboxgl/qmapboxglstylechange_p.h
+++ b/src/plugins/geoservices/mapboxgl/qmapboxglstylechange_p.h
@@ -51,7 +51,6 @@
#include <QtLocation/private/qdeclarativepolygonmapitem_p.h>
#include <QtLocation/private/qdeclarativepolylinemapitem_p.h>
#include <QtLocation/private/qdeclarativerectanglemapitem_p.h>
-#include <QtLocation/private/qgeomapparameter_p.h>
#include <QMapboxGL>
@@ -60,9 +59,7 @@ class QMapboxGLStyleChange
public:
virtual ~QMapboxGLStyleChange() = default;
- static QList<QSharedPointer<QMapboxGLStyleChange>> addMapParameter(QGeoMapParameter *);
static QList<QSharedPointer<QMapboxGLStyleChange>> addMapItem(QDeclarativeGeoMapItemBase *, const QString &before);
- static QList<QSharedPointer<QMapboxGLStyleChange>> removeMapParameter(QGeoMapParameter *);
static QList<QSharedPointer<QMapboxGLStyleChange>> removeMapItem(QDeclarativeGeoMapItemBase *);
virtual void apply(QMapboxGL *map) = 0;
@@ -71,7 +68,6 @@ public:
class QMapboxGLStyleSetLayoutProperty : public QMapboxGLStyleChange
{
public:
- static QList<QSharedPointer<QMapboxGLStyleChange>> fromMapParameter(QGeoMapParameter *);
static QList<QSharedPointer<QMapboxGLStyleChange>> fromMapItem(QDeclarativeGeoMapItemBase *);
void apply(QMapboxGL *map) override;
@@ -90,7 +86,6 @@ private:
class QMapboxGLStyleSetPaintProperty : public QMapboxGLStyleChange
{
public:
- static QList<QSharedPointer<QMapboxGLStyleChange>> fromMapParameter(QGeoMapParameter *);
static QList<QSharedPointer<QMapboxGLStyleChange>> fromMapItem(QDeclarativeGeoMapItemBase *);
void apply(QMapboxGL *map) override;
@@ -112,7 +107,6 @@ private:
class QMapboxGLStyleAddLayer : public QMapboxGLStyleChange
{
public:
- static QSharedPointer<QMapboxGLStyleChange> fromMapParameter(QGeoMapParameter *);
static QSharedPointer<QMapboxGLStyleChange> fromFeature(const QMapbox::Feature &feature, const QString &before);
void apply(QMapboxGL *map) override;
@@ -140,7 +134,6 @@ private:
class QMapboxGLStyleAddSource : public QMapboxGLStyleChange
{
public:
- static QSharedPointer<QMapboxGLStyleChange> fromMapParameter(QGeoMapParameter *);
static QSharedPointer<QMapboxGLStyleChange> fromFeature(const QMapbox::Feature &feature);
static QSharedPointer<QMapboxGLStyleChange> fromMapItem(QDeclarativeGeoMapItemBase *);
@@ -169,8 +162,6 @@ private:
class QMapboxGLStyleSetFilter : public QMapboxGLStyleChange
{
public:
- static QSharedPointer<QMapboxGLStyleChange> fromMapParameter(QGeoMapParameter *);
-
void apply(QMapboxGL *map) override;
private:
@@ -183,8 +174,6 @@ private:
class QMapboxGLStyleAddImage : public QMapboxGLStyleChange
{
public:
- static QSharedPointer<QMapboxGLStyleChange> fromMapParameter(QGeoMapParameter *);
-
void apply(QMapboxGL *map) override;
private:
diff --git a/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp b/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp
index 4dd4d72d..44bd8f50 100644
--- a/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp
+++ b/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp
@@ -226,7 +226,6 @@ QStringList QGeoRoutingManagerEngineNokia::calculateRouteRequestString(const QGe
baseRequest += m_token;
}
- const QList<QVariantMap> metadata = request.waypointsMetadata();
const QList<QGeoCoordinate> waypoints = request.waypoints();
int numWaypoints = waypoints.size();
if (numWaypoints < 2)
@@ -241,13 +240,6 @@ QStringList QGeoRoutingManagerEngineNokia::calculateRouteRequestString(const QGe
baseRequest += ',';
baseRequest += trimDouble(c.longitude());
baseRequest += QStringLiteral(";;"); // ;<TransitRadius>;<UserLabel>
- if (metadata.size() > i) {
- const QVariantMap &meta = metadata.at(i);
- if (meta.contains(QStringLiteral("bearing"))) {
- qreal bearing = meta.value(QStringLiteral("bearing")).toDouble();
- baseRequest += ';' + QString::number(int(bearing));
- }
- }
}
QGeoRouteRequest::RouteOptimizations optimization = request.routeOptimization();