summaryrefslogtreecommitdiff
path: root/src/imports
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-04-11 14:15:24 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-04-11 14:15:24 +0200
commit56e80eb797b55458614599a82c2264c46e6e5eb0 (patch)
tree5740b8ed298559c45f045d5daad8481e4c3eb39b /src/imports
parentba8da105e12f272bd95e2c10e7035edaaaecfa2a (diff)
parent400c7fa8e767c65aab4b8a1d5161b5259080cec9 (diff)
downloadqtlocation-56e80eb797b55458614599a82c2264c46e6e5eb0.tar.gz
Merge remote-tracking branch 'origin/stable' into dev
Change-Id: Ib061722a7ebc4b26bf132c67a005910f2d39400f
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/location/qdeclarativegeomap.cpp9
-rw-r--r--src/imports/location/qdeclarativegeomapgesturearea.cpp2
2 files changed, 7 insertions, 4 deletions
diff --git a/src/imports/location/qdeclarativegeomap.cpp b/src/imports/location/qdeclarativegeomap.cpp
index 59590309..5d40935f 100644
--- a/src/imports/location/qdeclarativegeomap.cpp
+++ b/src/imports/location/qdeclarativegeomap.cpp
@@ -187,7 +187,7 @@ QDeclarativeGeoMap::QDeclarativeGeoMap(QQuickItem *parent)
serviceProvider_(0),
mappingManager_(0),
zoomLevel_(8.0),
- center_(0,0),
+ center_(51.5073,-0.1277), //London city center
activeMapType_(0),
componentCompleted_(false),
mappingManagerInitialized_(false),
@@ -643,10 +643,10 @@ qreal QDeclarativeGeoMap::zoomLevel() const
}
/*!
-\qmlproperty coordinate QtLocation::Map::center
+ \qmlproperty coordinate QtLocation::Map::center
This property holds the coordinate which occupies the center of the
- mapping viewport.
+ mapping viewport. Invalid center coordinates are ignored.
The default value is an arbitrary valid coordinate.
*/
@@ -655,6 +655,9 @@ void QDeclarativeGeoMap::setCenter(const QGeoCoordinate &center)
if (!mappingManagerInitialized_ && center == center_)
return;
+ if (!center.isValid())
+ return;
+
center_ = center;
if (center_.isValid() && mappingManagerInitialized_) {
diff --git a/src/imports/location/qdeclarativegeomapgesturearea.cpp b/src/imports/location/qdeclarativegeomapgesturearea.cpp
index 336f922f..75b28cc3 100644
--- a/src/imports/location/qdeclarativegeomapgesturearea.cpp
+++ b/src/imports/location/qdeclarativegeomapgesturearea.cpp
@@ -274,7 +274,7 @@ QT_BEGIN_NAMESPACE
\qmlsignal QtLocation::MapGestureArea::pinchUpdated(PinchEvent event)
This signal is emitted as the user's fingers move across the map,
- after the the \l pinchStarted signal is emitted.
+ after the \l pinchStarted signal is emitted.
The corresponding handler is \c onPinchUpdated.