Skip to content

Commit

Permalink
Use OverpassDownloadReader.OVERPASS_SERVER property
Browse files Browse the repository at this point in the history
  • Loading branch information
simon04 committed Aug 12, 2020
1 parent f7e8383 commit 1ac46e7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import org.openstreetmap.josm.data.osm.Way;
import org.openstreetmap.josm.gui.MainApplication;
import org.openstreetmap.josm.gui.Notification;
import org.openstreetmap.josm.io.OverpassDownloadReader;
import org.openstreetmap.josm.tools.HttpClient;
import org.openstreetmap.josm.tools.ImageProvider;
import org.openstreetmap.josm.tools.Shortcut;
Expand All @@ -54,7 +55,6 @@ public class AustriaAddressHelperAction extends JosmAction {
protected static String[] streetTypeTags = {"addr:street", "addr:place", "addr:hamlet", "addr:suburb"};
protected static String[] objectTypesToCheckforDuplicates = {"way", "node", "relation"};
protected static String streetTypeTagPlaceholder = "___street_type_tag___";
protected static String overpassBaseUrl = "https://overpass-api.de/api/interpreter";

public AustriaAddressHelperAction() {
super(tr("Fetch Address"), new ImageProvider("icon.png"), tr("Fetch Address"),
Expand Down Expand Up @@ -356,7 +356,7 @@ protected static ArrayList<String> getUrlsOfObjectsWithThatAddress(OsmPrimitive
Exception exception = null;

try {
URL url = new URL(overpassBaseUrl
URL url = new URL(OverpassDownloadReader.OVERPASS_SERVER.get() + "interpreter"
+ "?data=" + URLEncoder.encode(query, "UTF-8")
);

Expand Down

0 comments on commit 1ac46e7

Please sign in to comment.