summaryrefslogtreecommitdiff
path: root/platform/qt/include
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2016-02-03 17:20:26 +0200
committerThiago Marcos P. Santos <thiago@mapbox.com>2016-04-20 20:55:51 +0300
commite974dd282d3337856fd1a83e76878e1ff6ce1bf1 (patch)
tree1cc0b12c4339956a850bfb1774d0871639c78cb5 /platform/qt/include
parent19e11293676db729909e10659f3e0710a251a03b (diff)
downloadqtlocation-mapboxgl-e974dd282d3337856fd1a83e76878e1ff6ce1bf1.tar.gz
[Qt] Add function for get coordinates and zoom based on a bounding box
Diffstat (limited to 'platform/qt/include')
-rw-r--r--platform/qt/include/qmapbox.hpp2
-rw-r--r--platform/qt/include/qmapboxgl.hpp3
2 files changed, 5 insertions, 0 deletions
diff --git a/platform/qt/include/qmapbox.hpp b/platform/qt/include/qmapbox.hpp
index 8877d730bb..fc52218bb2 100644
--- a/platform/qt/include/qmapbox.hpp
+++ b/platform/qt/include/qmapbox.hpp
@@ -13,6 +13,8 @@ typedef QPair<double, double> Coordinate;
typedef QList<Coordinate> Coordinates;
typedef QList<Coordinates> CoordinateSegments;
+typedef QPair<Coordinate, double> CoordinateZoom;
+
typedef quint32 AnnotationID;
typedef QList<AnnotationID> AnnotationIDs;
diff --git a/platform/qt/include/qmapboxgl.hpp b/platform/qt/include/qmapboxgl.hpp
index 01538268d7..f3e0af98ea 100644
--- a/platform/qt/include/qmapboxgl.hpp
+++ b/platform/qt/include/qmapboxgl.hpp
@@ -158,6 +158,9 @@ public:
QPointF pixelForCoordinate(const QMapbox::Coordinate &) const;
QMapbox::Coordinate coordinateForPixel(const QPointF &) const;
+ QMapbox::CoordinateZoom coordinateZoomForBounds(const QMapbox::Coordinate &sw, QMapbox::Coordinate &ne) const;
+ QMapbox::CoordinateZoom coordinateZoomForBounds(const QMapbox::Coordinate &sw, QMapbox::Coordinate &ne, double bearing, double pitch);
+
void setMargins(const QMargins &margins);
QMargins margins() const;