Skip to content

Commit

Permalink
Fixed OSM base url in goto dialog.
Browse files Browse the repository at this point in the history
  • Loading branch information
Krakonos committed Aug 26, 2024
1 parent df1e744 commit ea79311
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/Utils/OsmServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ class IOsmServerImpl : public QObject {
return QUrl(getServerInfo().Url);
}

virtual QUrl apiUrl() const {
return QUrl(getServerInfo().Url).resolved(QUrl("/api/0.6"));
}


enum class Error {
NoError,
Unauthorized,
Expand Down
2 changes: 1 addition & 1 deletion src/common/GotoDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ GotoDialog::GotoDialog(MapView* aView, QWidget *parent)
.arg(QString::number(OsmZoom))
);
coordOsmApi->setText( QString("%1/map?bbox=%2,%3,%4,%5")
// .arg(M_PREFS->getOsmApiUrl()) //FIXME: Wut?
.arg(M_PREFS->getOsmServer()->apiUrl().toString())
.arg(COORD2STRING(theViewport.bottomLeft().x()))
.arg(COORD2STRING(theViewport.bottomLeft().y()))
.arg(COORD2STRING(theViewport.topRight().x()))
Expand Down

0 comments on commit ea79311

Please sign in to comment.