Commit 25d873a1 authored by Torsten Rahn's avatar Torsten Rahn Committed by Torsten Rahn

BUG: 394517

Changing nominatim to https.
parent 91f63ee2
......@@ -49,7 +49,7 @@ void OsmNominatimRunner::returnNoReverseGeocodingResult()
void OsmNominatimRunner::reverseGeocoding( const GeoDataCoordinates &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
QString query = "&lon=%1&lat=%2&accept-language=%3";
double lon = coordinates.longitude( GeoDataCoordinates::Degree );
......
......@@ -50,7 +50,7 @@ void OsmNominatimRunner::returnNoResults()
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 url = QString(base + query).arg(searchTerm).arg(MarbleLocale::languageCode());
if( !preferred.isEmpty() ) {
......@@ -107,6 +107,7 @@ void OsmNominatimRunner::handleResult( QNetworkReply* reply )
QDomDocument xml;
if (!xml.setContent(reply->readAll())) {
qWarning() << "Cannot parse osm nominatim result";
qWarning() << reply->error();
returnNoResults();
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