diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-08-19 14:29:06 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-08-19 14:29:06 +0200 |
commit | 1e9eb569c57c08f0eaa79a9afeb57402271f11b1 (patch) | |
tree | e8e5c5befba04e9d10ec84e8d829076838905ac5 /src | |
parent | 33d57f8018535dfe4ac316fc0f2ebe69fb5ade1c (diff) | |
parent | d1c91515ef0ad4208c41a4052f92bfb817333aca (diff) | |
download | qtlocation-1e9eb569c57c08f0eaa79a9afeb57402271f11b1.tar.gz |
Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
src/imports/location/qquickgeomapgesturearea.cpp
Change-Id: If115a052678b140eee46b8c0d9471b7d96953915
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/location/qquickgeomapgesturearea.cpp | 2 | ||||
-rw-r--r-- | src/location/doc/images/places-list.png | bin | 28215 -> 18195 bytes | |||
-rw-r--r-- | src/location/doc/images/places-map.png | bin | 0 -> 167995 bytes | |||
-rw-r--r-- | src/location/doc/src/examples/places-map.qdoc | 2 | ||||
-rw-r--r-- | src/location/doc/src/places.qdoc | 2 | ||||
-rw-r--r-- | src/location/doc/src/plugins/osm.qdoc | 15 | ||||
-rw-r--r-- | src/location/maps/qgeocameratiles.cpp | 1 | ||||
-rw-r--r-- | src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp | 2 | ||||
-rw-r--r-- | src/plugins/geoservices/osm/qgeoroutingmanagerengineosm.cpp | 8 | ||||
-rw-r--r-- | src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp | 2 | ||||
-rw-r--r-- | src/plugins/geoservices/osm/qplacemanagerengineosm.cpp | 7 | ||||
-rw-r--r-- | src/plugins/geoservices/osm/qplacemanagerengineosm.h | 1 | ||||
-rw-r--r-- | src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp | 2 |
13 files changed, 28 insertions, 16 deletions
diff --git a/src/imports/location/qquickgeomapgesturearea.cpp b/src/imports/location/qquickgeomapgesturearea.cpp index 8c4eadda..981b0a8b 100644 --- a/src/imports/location/qquickgeomapgesturearea.cpp +++ b/src/imports/location/qquickgeomapgesturearea.cpp @@ -1180,8 +1180,6 @@ bool QQuickGeoMapGestureArea::tryStartFlick() /*! \internal */ -// FIXME: -// - not left right / up down flicking, so if map is rotated, will act unintuitively void QQuickGeoMapGestureArea::startFlick(int dx, int dy, int timeMs) { if (timeMs < 0) diff --git a/src/location/doc/images/places-list.png b/src/location/doc/images/places-list.png Binary files differindex 02416e53..bf09a031 100644 --- a/src/location/doc/images/places-list.png +++ b/src/location/doc/images/places-list.png diff --git a/src/location/doc/images/places-map.png b/src/location/doc/images/places-map.png Binary files differnew file mode 100644 index 00000000..4982df23 --- /dev/null +++ b/src/location/doc/images/places-map.png diff --git a/src/location/doc/src/examples/places-map.qdoc b/src/location/doc/src/examples/places-map.qdoc index 7796c8ba..6e58bfb8 100644 --- a/src/location/doc/src/examples/places-map.qdoc +++ b/src/location/doc/src/examples/places-map.qdoc @@ -32,7 +32,7 @@ \brief The Places Map example demonstrates how to search for and display a list of places on a map using a MapItemView - \image places-map.jpg + \image places-map.png The example displays a map of the current location or, if no position is available, it uses Brisbane/Australia. Subsequently a search for places diff --git a/src/location/doc/src/places.qdoc b/src/location/doc/src/places.qdoc index 4de65220..291af614 100644 --- a/src/location/doc/src/places.qdoc +++ b/src/location/doc/src/places.qdoc @@ -155,7 +155,7 @@ \li \snippet places_map/places_map.qml Places MapItemView \li - \inlineimage places-map.jpg + \inlineimage places-map.png \endtable \note For simplicty's sake we have assumed that every search result is of diff --git a/src/location/doc/src/plugins/osm.qdoc b/src/location/doc/src/plugins/osm.qdoc index d5b23437..f6de9c20 100644 --- a/src/location/doc/src/plugins/osm.qdoc +++ b/src/location/doc/src/plugins/osm.qdoc @@ -72,13 +72,20 @@ a prefix. \row \li osm.routing.host \li Url string set when making network requests to the routing server. This parameter should be set to a - valid server url with the correct osrm api. If not specified the default \l {http://router.project-osrm.org/viaroute}{url} will be used. - \note The api documentation and sources are available at \l {http://project-osrm.org/}{Project OSRM}. + valid server url with the correct osrm API. If not specified the default \l {http://router.project-osrm.org/viaroute}{url} will be used. + \note The API documentation and sources are available at \l {http://project-osrm.org/}{Project OSRM}. \row \li osm.geocoding.host \li Url string set when making network requests to the geocoding server. This parameter should be set to a - valid server url with the correct osm api. If not specified the default \l {http://nominatim.openstreetmap.org/}{url} will be used. - \note The api documentation is available at \l {https://wiki.openstreetmap.org/wiki/Nominatim}{Project OSM Nominatim}. + valid server url with the correct osm API. If not specified the default \l {http://nominatim.openstreetmap.org/}{url} will be used. + \note The API documentation is available at \l {https://wiki.openstreetmap.org/wiki/Nominatim}{Project OSM Nominatim}. +\row + \li osm.places.host + \li Url string set when making network requests to the places server. + This parameter should be set to a valid server url with the correct osm API. + If not specified the default \l {http://nominatim.openstreetmap.org/search}{url} + will be used. + \note The API documentation is available at \l {https://wiki.openstreetmap.org/wiki/Nominatim}{Project OSM Nominatim}. \endtable \section1 Parameter Usage Example diff --git a/src/location/maps/qgeocameratiles.cpp b/src/location/maps/qgeocameratiles.cpp index 58aa1f30..d2783a5b 100644 --- a/src/location/maps/qgeocameratiles.cpp +++ b/src/location/maps/qgeocameratiles.cpp @@ -152,6 +152,7 @@ QSet<QGeoTileSpec> QGeoCameraTiles::prefetchTiles(PrefetchStle style) double neighbourScale = (1.0 + zoomFraction)/2.0; d_ptr->updateGeometry(PREFETCH_FRUSTUM_SCALE * neighbourScale); } + break; } case PrefetchTwoNeighbourLayers: { diff --git a/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp b/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp index 4ddc8a79..757b9577 100644 --- a/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp +++ b/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp @@ -75,7 +75,7 @@ QGeoCodingManagerEngineOsm::QGeoCodingManagerEngineOsm(const QVariantMap ¶me m_userAgent = "Qt Location based application"; if (parameters.contains(QStringLiteral("osm.geocoding.host"))) - m_urlPrefix = parameters.value(QStringLiteral("geocoding.host")).toString().toLatin1(); + m_urlPrefix = parameters.value(QStringLiteral("osm.geocoding.host")).toString().toLatin1(); else m_urlPrefix = QStringLiteral("http://nominatim.openstreetmap.org"); diff --git a/src/plugins/geoservices/osm/qgeoroutingmanagerengineosm.cpp b/src/plugins/geoservices/osm/qgeoroutingmanagerengineosm.cpp index ab582434..df3351c2 100644 --- a/src/plugins/geoservices/osm/qgeoroutingmanagerengineosm.cpp +++ b/src/plugins/geoservices/osm/qgeoroutingmanagerengineosm.cpp @@ -43,13 +43,13 @@ QGeoRoutingManagerEngineOsm::QGeoRoutingManagerEngineOsm(const QVariantMap ¶ QString *errorString) : QGeoRoutingManagerEngine(parameters), m_networkManager(new QNetworkAccessManager(this)) { - if (parameters.contains(QStringLiteral("useragent"))) - m_userAgent = parameters.value(QStringLiteral("useragent")).toString().toLatin1(); + if (parameters.contains(QStringLiteral("osm.useragent"))) + m_userAgent = parameters.value(QStringLiteral("osm.useragent")).toString().toLatin1(); else m_userAgent = "Qt Location based application"; - if (parameters.contains(QStringLiteral("routing.host"))) - m_urlPrefix = parameters.value(QStringLiteral("routing.host")).toString().toLatin1(); + if (parameters.contains(QStringLiteral("osm.routing.host"))) + m_urlPrefix = parameters.value(QStringLiteral("osm.routing.host")).toString().toLatin1(); else m_urlPrefix = QStringLiteral("http://router.project-osrm.org/viaroute"); diff --git a/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp b/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp index d89de0b0..3671051d 100644 --- a/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp +++ b/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp @@ -46,7 +46,7 @@ QGeoTiledMappingManagerEngineOsm::QGeoTiledMappingManagerEngineOsm(const QVarian { QGeoCameraCapabilities cameraCaps; cameraCaps.setMinimumZoomLevel(0.0); - cameraCaps.setMaximumZoomLevel(18.0); + cameraCaps.setMaximumZoomLevel(19.0); setCameraCapabilities(cameraCaps); setTileSize(QSize(256, 256)); diff --git a/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp b/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp index 2ae5bd7e..ed2c9ff0 100644 --- a/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp +++ b/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp @@ -97,6 +97,11 @@ QPlaceManagerEngineOsm::QPlaceManagerEngineOsm(const QVariantMap ¶meters, else m_userAgent = "Qt Location based application"; + if (parameters.contains(QStringLiteral("osm.places.host"))) + m_urlPrefix = parameters.value(QStringLiteral("osm.places.host")).toString(); + else + m_urlPrefix = QStringLiteral("http://nominatim.openstreetmap.org/search"); + *error = QGeoServiceProvider::NoError; errorString->clear(); } @@ -175,7 +180,7 @@ QPlaceSearchReply *QPlaceManagerEngineOsm::search(const QPlaceSearchRequest &req queryItems.addQueryItem(QStringLiteral("addressdetails"), QStringLiteral("1")); - QUrl requestUrl(QStringLiteral("http://nominatim.openstreetmap.org/search?")); + QUrl requestUrl(m_urlPrefix); requestUrl.setQuery(queryItems); QNetworkReply *networkReply = m_networkManager->get(QNetworkRequest(requestUrl)); diff --git a/src/plugins/geoservices/osm/qplacemanagerengineosm.h b/src/plugins/geoservices/osm/qplacemanagerengineosm.h index 9a15b493..828d7bf1 100644 --- a/src/plugins/geoservices/osm/qplacemanagerengineosm.h +++ b/src/plugins/geoservices/osm/qplacemanagerengineosm.h @@ -75,6 +75,7 @@ private: QNetworkAccessManager *m_networkManager; QByteArray m_userAgent; + QString m_urlPrefix; QList<QLocale> m_locales; QNetworkReply *m_categoriesReply; diff --git a/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp b/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp index 53c2a903..fe5b048e 100644 --- a/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp +++ b/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp @@ -285,7 +285,7 @@ void QGeoPositionInfoSourceGeoclueMaster::setOptions() const QVariant v = i.value(); GValue *value = new GValue; - *value = { 0, { { 0 } } }; + memset(value, 0, sizeof(*value)); switch (v.userType()) { case QMetaType::QString: |