summaryrefslogtreecommitdiff
path: root/src/imports/location/qdeclarativegeomapquickitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/location/qdeclarativegeomapquickitem.cpp')
-rw-r--r--src/imports/location/qdeclarativegeomapquickitem.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/imports/location/qdeclarativegeomapquickitem.cpp b/src/imports/location/qdeclarativegeomapquickitem.cpp
index 78fd4f8f..fc710188 100644
--- a/src/imports/location/qdeclarativegeomapquickitem.cpp
+++ b/src/imports/location/qdeclarativegeomapquickitem.cpp
@@ -145,6 +145,9 @@ void QDeclarativeGeoMapQuickItem::setCoordinate(const QGeoCoordinate &coordinate
return;
coordinate_ = coordinate;
+ geoshape_.setTopLeft(coordinate_);
+ geoshape_.setBottomRight(coordinate_);
+ // TODO: Handle zoomLevel != 0.0
polishAndUpdate();
emit coordinateChanged();
@@ -278,6 +281,7 @@ void QDeclarativeGeoMapQuickItem::setZoomLevel(qreal zoomLevel)
if (zoomLevel == zoomLevel_)
return;
zoomLevel_ = zoomLevel;
+ // TODO: update geoshape_!
polishAndUpdate();
emit zoomLevelChanged();
}
@@ -287,6 +291,13 @@ qreal QDeclarativeGeoMapQuickItem::zoomLevel() const
return zoomLevel_;
}
+const QGeoShape &QDeclarativeGeoMapQuickItem::geoShape() const
+{
+ // TODO: return a QGeoRectangle representing the bounding geo rectangle of the quick item
+ // when zoomLevel_ is != 0.0
+ return geoshape_;
+}
+
/*!
\internal
*/