diff options
Diffstat (limited to 'src/imports/location/qdeclarativegeomap.cpp')
-rw-r--r-- | src/imports/location/qdeclarativegeomap.cpp | 9 |
1 files changed, 6 insertions, 3 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 ¢er) if (!mappingManagerInitialized_ && center == center_) return; + if (!center.isValid()) + return; + center_ = center; if (center_.isValid() && mappingManagerInitialized_) { |