Commit 86d22b6f authored by Kevin Kofler's avatar Kevin Kofler

Fix GeoNames web service URL, is now api.geonames.org (#432598)

Fix geonamesUrl in src/plugins/render/*/*.cpp from ws.geonames.org
(which no longer resolves) to api.geonames.org.

BUG: 432598
parent a5477796
......@@ -60,7 +60,7 @@ void EarthquakeModel::getAdditionalItems( const GeoDataLatLonAltBox& box, qint32
return;
}
const QString geonamesUrl( QLatin1String("http://ws.geonames.org/earthquakesJSON") +
const QString geonamesUrl( QLatin1String("http://api.geonames.org/earthquakesJSON") +
QLatin1String("?north=") + QString::number(box.north() * RAD2DEG) +
QLatin1String("&south=") + QString::number(box.south() * RAD2DEG) +
QLatin1String("&east=") + QString::number(box.east() * RAD2DEG) +
......
......@@ -52,7 +52,7 @@ void PostalCodeModel::getAdditionalItems( const GeoDataLatLonAltBox& box,
double const lon = box.center().longitude( GeoDataCoordinates::Degree );
double const radius = qMin<double>( 30.0, box.height() * marbleModel()->planet()->radius() * METER2KM );
QUrl geonamesUrl( "http://ws.geonames.org/findNearbyPostalCodesJSON" );
QUrl geonamesUrl( "http://api.geonames.org/findNearbyPostalCodesJSON" );
QUrlQuery urlQuery;
urlQuery.addQueryItem( "lat", QString::number( lat ) );
urlQuery.addQueryItem( "lng", QString::number( lon ) );
......
......@@ -47,7 +47,7 @@ void GeoNamesWeatherService::getAdditionalItems( const GeoDataLatLonAltBox& box,
return;
}
QUrl geonamesUrl( "http://ws.geonames.org/weatherJSON" );
QUrl geonamesUrl( "http://api.geonames.org/weatherJSON" );
QUrlQuery urlQuery;
urlQuery.addQueryItem( "north", QString::number( box.north( GeoDataCoordinates::Degree ) ) );
urlQuery.addQueryItem( "south", QString::number( box.south( GeoDataCoordinates::Degree ) ) );
......@@ -67,7 +67,7 @@ void GeoNamesWeatherService::getItem( const QString &id )
}
if ( id.startsWith(QLatin1String("geonames_") ) ) {
QUrl geonamesUrl( "http://ws.geonames.org/weatherIcaoJSON" );
QUrl geonamesUrl( "http://api.geonames.org/weatherIcaoJSON" );
QUrlQuery urlQuery;
urlQuery.addQueryItem( "ICAO", id.mid( 9 ) );
urlQuery.addQueryItem( "username", "marble" );
......
......@@ -59,7 +59,7 @@ void WikipediaModel::getAdditionalItems( const GeoDataLatLonAltBox& box,
return;
}
QUrl geonamesUrl( "http://ws.geonames.org/wikipediaBoundingBox" );
QUrl geonamesUrl( "http://api.geonames.org/wikipediaBoundingBox" );
QUrlQuery urlQuery;
urlQuery.addQueryItem( "north", QString::number( box.north( GeoDataCoordinates::Degree ) ) );
urlQuery.addQueryItem( "south", QString::number( box.south( GeoDataCoordinates::Degree ) ) );
......
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