diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-02-07 15:48:05 +0200 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-02-08 15:55:47 +0200 |
commit | 7db79da50185a471f77ebed52575c3bc212c7d7d (patch) | |
tree | 1710f01dc7a9d344d9fc4233e1304ebdcefc1150 /platform/qt/app | |
parent | 59d279b68904bbff0b23012cff327ad69abdb8f0 (diff) | |
download | qtlocation-mapboxgl-7db79da50185a471f77ebed52575c3bc212c7d7d.tar.gz |
[Qt] Added QMapbox::Feature
Diffstat (limited to 'platform/qt/app')
-rw-r--r-- | platform/qt/app/mapwindow.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/qt/app/mapwindow.cpp b/platform/qt/app/mapwindow.cpp index 3e6a14736f..050b498503 100644 --- a/platform/qt/app/mapwindow.cpp +++ b/platform/qt/app/mapwindow.cpp @@ -220,7 +220,7 @@ void MapWindow::keyPressEvent(QKeyEvent *ev) QMapbox::Coordinate topLeft = m_map->coordinateForPixel({ 0, 0 }); QMapbox::Coordinate bottomRight = m_map->coordinateForPixel({ qreal(size().width()), qreal(size().height()) }); QMapbox::CoordinatesCollections geometry { { { topLeft, bottomRight } } }; - QMapbox::LineAnnotation line { { QMapbox::ShapeAnnotationGeometry::Type::LineStringType, geometry }, 0.5f, 1.0f, Qt::red }; + QMapbox::LineAnnotation line { { QMapbox::ShapeAnnotationGeometry::LineStringType, geometry }, 0.5f, 1.0f, Qt::red }; m_lineAnnotationId = m_map->addAnnotation(QVariant::fromValue<QMapbox::LineAnnotation>(line)); } else { m_map->removeAnnotation(m_lineAnnotationId.toUInt()); @@ -235,7 +235,7 @@ void MapWindow::keyPressEvent(QKeyEvent *ev) 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::FillAnnotation fill { { QMapbox::ShapeAnnotationGeometry::Type::PolygonType, geometry }, 0.5f, Qt::green, QVariant::fromValue<QColor>(QColor(Qt::black)) }; + QMapbox::FillAnnotation fill { { QMapbox::ShapeAnnotationGeometry::PolygonType, geometry }, 0.5f, Qt::green, QVariant::fromValue<QColor>(QColor(Qt::black)) }; m_fillAnnotationId = m_map->addAnnotation(QVariant::fromValue<QMapbox::FillAnnotation>(fill)); } else { m_map->removeAnnotation(m_fillAnnotationId.toUInt()); @@ -250,7 +250,7 @@ void MapWindow::keyPressEvent(QKeyEvent *ev) 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::Type::PolygonType, geometry }, "water" }; + 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()); |