summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices/osm/qgeocodereplyosm.cpp
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2018-12-03 18:59:57 +0100
committerPaolo Angelelli <paolo.angelelli@qt.io>2018-12-11 00:13:57 +0000
commit67b351588d2bb295ceffb800aecd0f3b44326059 (patch)
tree2317fc528dd1703d3bfaa14eab2a12d90053ac9b /src/plugins/geoservices/osm/qgeocodereplyosm.cpp
parentd8ddf70b4bb43ef52786090e287498f0829c1b11 (diff)
downloadqtlocation-67b351588d2bb295ceffb800aecd0f3b44326059.tar.gz
Extract all available fields in osm geocode reply
The reply object that OSM Nominatim returns includes a number of nominatim-specific fields. This patch exposes them through the extendedAttributes property. Change-Id: I7d46880e0674b6b513738e4a9e82ce6b728c377c Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/plugins/geoservices/osm/qgeocodereplyosm.cpp')
-rw-r--r--src/plugins/geoservices/osm/qgeocodereplyosm.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/geoservices/osm/qgeocodereplyosm.cpp b/src/plugins/geoservices/osm/qgeocodereplyosm.cpp
index 0bdf4bf9..e6a487ba 100644
--- a/src/plugins/geoservices/osm/qgeocodereplyosm.cpp
+++ b/src/plugins/geoservices/osm/qgeocodereplyosm.cpp
@@ -102,7 +102,14 @@ static void injectExtra(QGeoLocation &location, const QJsonObject &object)
{
QVariantMap extra;
static const QList<QString> extraKeys = { QStringLiteral("geojson"),
- QStringLiteral("class") };
+ QStringLiteral("icon"),
+ QStringLiteral("importance"),
+ QStringLiteral("type"),
+ QStringLiteral("osm_id"),
+ QStringLiteral("osm_type"),
+ QStringLiteral("licence"),
+ QStringLiteral("place_id"),
+ QStringLiteral("class") };
for (const auto k: extraKeys) {
if (object.contains(k))