Ticket #23680: 23680.patch

File 23680.patch, 955 bytes (added by GerdP, 18 months ago)

try to interpret the place name as lat lon pair before asking Nominatim for a result (ignores Zoom field)

  • src/org/openstreetmap/josm/actions/JumpToAction.java

     
    175175            if (option != 1) return;
    176176            if (place.hasFocus() && !place.getText().trim().isEmpty()) {
    177177                try {
     178                    ll = LatLonParser.parse(place.getText());
     179                    if (ll != null)
     180                        break;
     181                } catch (IllegalArgumentException ex) {
     182                    Logging.info(ex);
     183                }
     184                try {
    178185                    List<NameFinder.SearchResult> searchResults = NameFinder.queryNominatim(place.getText());
    179186                    if (!searchResults.isEmpty()) {
    180187                        NameFinder.SearchResult searchResult = searchResults.get(0);