Commit 132ca62c authored by Torsten Rahn's avatar Torsten Rahn Committed by Torsten Rahn
Browse files

BUG: 394517

Changing nominatim to https.
parent 285d4e81
...@@ -48,7 +48,7 @@ void OsmNominatimRunner::returnNoReverseGeocodingResult() ...@@ -48,7 +48,7 @@ void OsmNominatimRunner::returnNoReverseGeocodingResult()
void OsmNominatimRunner::reverseGeocoding( const GeoDataCoordinates &coordinates ) void OsmNominatimRunner::reverseGeocoding( const GeoDataCoordinates &coordinates )
{ {
m_coordinates = coordinates; m_coordinates = coordinates;
QString base = "http://nominatim.openstreetmap.org/reverse?format=xml&addressdetails=1"; QString base = "https://nominatim.openstreetmap.org/reverse?format=xml&addressdetails=1";
// @todo: Alternative URI with addressdetails=1 could be used for shorther placemark name // @todo: Alternative URI with addressdetails=1 could be used for shorther placemark name
QString query = "&lon=%1&lat=%2&accept-language=%3"; QString query = "&lon=%1&lat=%2&accept-language=%3";
double lon = coordinates.longitude( GeoDataCoordinates::Degree ); double lon = coordinates.longitude( GeoDataCoordinates::Degree );
......
...@@ -49,7 +49,7 @@ void OsmNominatimRunner::returnNoResults() ...@@ -49,7 +49,7 @@ void OsmNominatimRunner::returnNoResults()
void OsmNominatimRunner::search( const QString &searchTerm, const GeoDataLatLonBox &preferred ) void OsmNominatimRunner::search( const QString &searchTerm, const GeoDataLatLonBox &preferred )
{ {
QString base = "http://nominatim.openstreetmap.org/search?"; QString base = "https://nominatim.openstreetmap.org/search?";
QString query = "q=%1&format=xml&addressdetails=1&accept-language=%2"; QString query = "q=%1&format=xml&addressdetails=1&accept-language=%2";
QString url = QString(base + query).arg(searchTerm).arg(MarbleLocale::languageCode()); QString url = QString(base + query).arg(searchTerm).arg(MarbleLocale::languageCode());
if( !preferred.isEmpty() ) { if( !preferred.isEmpty() ) {
...@@ -106,6 +106,7 @@ void OsmNominatimRunner::handleResult( QNetworkReply* reply ) ...@@ -106,6 +106,7 @@ void OsmNominatimRunner::handleResult( QNetworkReply* reply )
QDomDocument xml; QDomDocument xml;
if (!xml.setContent(reply->readAll())) { if (!xml.setContent(reply->readAll())) {
qWarning() << "Cannot parse osm nominatim result"; qWarning() << "Cannot parse osm nominatim result";
qWarning() << reply->error();
returnNoResults(); returnNoResults();
return; return;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment