diff options
Diffstat (limited to 'platform')
-rw-r--r-- | platform/qt/app/mapwindow.cpp | 15 | ||||
-rw-r--r-- | platform/qt/app/mapwindow.hpp | 1 | ||||
-rw-r--r-- | platform/qt/include/qmapbox.hpp | 6 | ||||
-rw-r--r-- | platform/qt/src/qmapbox.cpp | 10 | ||||
-rw-r--r-- | platform/qt/src/qmapboxgl.cpp | 3 |
5 files changed, 0 insertions, 35 deletions
diff --git a/platform/qt/app/mapwindow.cpp b/platform/qt/app/mapwindow.cpp index a72faf005e..5bb9ad1261 100644 --- a/platform/qt/app/mapwindow.cpp +++ b/platform/qt/app/mapwindow.cpp @@ -277,21 +277,6 @@ void MapWindow::keyPressEvent(QKeyEvent *ev) } } break; - case Qt::Key_4: { - if (m_styleSourcedAnnotationId.isNull()) { - QMapbox::Coordinate topLeft = m_map->coordinateForPixel({ 0, 0 }); - QMapbox::Coordinate topRight = m_map->coordinateForPixel({ 0, qreal(size().height()) }); - QMapbox::Coordinate bottomLeft = m_map->coordinateForPixel({ qreal(size().width()), 0 }); - QMapbox::Coordinate bottomRight = m_map->coordinateForPixel({ qreal(size().width()), qreal(size().height()) }); - QMapbox::CoordinatesCollections geometry { { { bottomLeft, bottomRight, topRight, topLeft, bottomLeft } } }; - QMapbox::StyleSourcedAnnotation styleSourced { { QMapbox::ShapeAnnotationGeometry::PolygonType, geometry }, "water" }; - m_styleSourcedAnnotationId = m_map->addAnnotation(QVariant::fromValue<QMapbox::StyleSourcedAnnotation>(styleSourced)); - } else { - m_map->removeAnnotation(m_styleSourcedAnnotationId.toUInt()); - m_styleSourcedAnnotationId.clear(); - } - } - break; case Qt::Key_5: { if (m_map->layerExists("circleLayer")) { m_map->removeLayer("circleLayer"); diff --git a/platform/qt/app/mapwindow.hpp b/platform/qt/app/mapwindow.hpp index 6b4b7fd1cc..c484114ec0 100644 --- a/platform/qt/app/mapwindow.hpp +++ b/platform/qt/app/mapwindow.hpp @@ -64,7 +64,6 @@ private: QVariant m_symbolAnnotationId; QVariant m_lineAnnotationId; QVariant m_fillAnnotationId; - QVariant m_styleSourcedAnnotationId; bool m_sourceAdded = false; }; diff --git a/platform/qt/include/qmapbox.hpp b/platform/qt/include/qmapbox.hpp index e69b37108d..1b61d3270f 100644 --- a/platform/qt/include/qmapbox.hpp +++ b/platform/qt/include/qmapbox.hpp @@ -62,11 +62,6 @@ struct Q_DECL_EXPORT FillAnnotation { QVariant outlineColor; }; -struct Q_DECL_EXPORT StyleSourcedAnnotation { - ShapeAnnotationGeometry geometry; - QString layerID; -}; - typedef QVariant Annotation; typedef quint32 AnnotationID; typedef QList<AnnotationID> AnnotationIDs; @@ -109,6 +104,5 @@ Q_DECLARE_METATYPE(QMapbox::SymbolAnnotation); Q_DECLARE_METATYPE(QMapbox::ShapeAnnotationGeometry); Q_DECLARE_METATYPE(QMapbox::LineAnnotation); Q_DECLARE_METATYPE(QMapbox::FillAnnotation); -Q_DECLARE_METATYPE(QMapbox::StyleSourcedAnnotation); #endif // QMAPBOX_H diff --git a/platform/qt/src/qmapbox.cpp b/platform/qt/src/qmapbox.cpp index 410e114690..751b16f9db 100644 --- a/platform/qt/src/qmapbox.cpp +++ b/platform/qt/src/qmapbox.cpp @@ -139,16 +139,6 @@ namespace QMapbox { */ /*! - \class QMapbox::StyleSourcedAnnotation - - \inmodule Mapbox Qt SDK - - Represents a style sourced annotation object, along with its properties. - - A style sourced annotation comprises of its geometry and a layer identifier. -*/ - -/*! \typedef QMapbox::Annotation Alias for QVariant. diff --git a/platform/qt/src/qmapboxgl.cpp b/platform/qt/src/qmapboxgl.cpp index ce7e237afb..e1b8889603 100644 --- a/platform/qt/src/qmapboxgl.cpp +++ b/platform/qt/src/qmapboxgl.cpp @@ -866,9 +866,6 @@ mbgl::Annotation asMapboxGLAnnotation(const QMapbox::Annotation & annotation) { } else { return mbgl::FillAnnotation { asMapboxGLGeometry(fillAnnotation.geometry), fillAnnotation.opacity, { *color }, {} }; } - } else if (annotation.canConvert<QMapbox::StyleSourcedAnnotation>()) { - QMapbox::StyleSourcedAnnotation styleSourcedAnnotation = annotation.value<QMapbox::StyleSourcedAnnotation>(); - return mbgl::StyleSourcedAnnotation { asMapboxGLGeometry(styleSourcedAnnotation.geometry), styleSourcedAnnotation.layerID.toStdString() }; } qWarning() << "Unable to convert annotation:" << annotation; |