Skip to content

Commit

Permalink
Add viewbox parameter only if bounds are finite
Browse files Browse the repository at this point in the history
fixes #50807
  • Loading branch information
pathmapper authored and nyalldawson committed Nov 14, 2022
1 parent f307c0f commit de18075
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/geocoding/qgsnominatimgeocoder.cpp
Expand Up @@ -150,7 +150,7 @@ QUrl QgsNominatimGeocoder::requestUrl( const QString &address, const QgsRectangl
QUrlQuery query;
query.addQueryItem( QStringLiteral( "format" ), QStringLiteral( "json" ) );
query.addQueryItem( QStringLiteral( "addressdetails" ), QStringLiteral( "1" ) );
if ( !bounds.isNull() )
if ( !bounds.isNull() && bounds.isFinite() )
{
query.addQueryItem( QStringLiteral( "viewbox" ), QStringLiteral( "%1,%2,%3,%4" ).arg( bounds.xMinimum() )
.arg( bounds.yMinimum() )
Expand Down

0 comments on commit de18075

Please sign in to comment.