summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-04-26 14:55:18 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-05-10 14:22:01 -0700
commitc130d470a10fc6c43696d0a6fe720dac6da12e3a (patch)
treeec3700ed4d7a87e90f1efb6be68366f74c3730f7 /platform
parentb7b6706576dc196fa74bb2089d3efdf2a2b4c357 (diff)
downloadqtlocation-mapboxgl-c130d470a10fc6c43696d0a6fe720dac6da12e3a.tar.gz
[core] Remove StyleSourcedAnnotation support
The functionality this provided has been subsumed by the runtime styling API.
Diffstat (limited to 'platform')
-rw-r--r--platform/qt/app/mapwindow.cpp15
-rw-r--r--platform/qt/app/mapwindow.hpp1
-rw-r--r--platform/qt/include/qmapbox.hpp6
-rw-r--r--platform/qt/src/qmapbox.cpp10
-rw-r--r--platform/qt/src/qmapboxgl.cpp3
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;