Modify

Opened 8 months ago

Closed 7 months ago

Last modified 6 months ago

#19127 closed enhancement (fixed)

Jump to Position: jump to place name

Reported by: simon04 Owned by: simon04
Priority: normal Milestone: 20.05
Component: Core Version:
Keywords: Cc:

Description

I would like to augment Jump to Position with a basic geocoder. This is the intended fast workflow:

  1. Press Ctrl+J
  2. Input the place name
  3. Press enter
  4. Nominatim is queried, the map view moves to the first result


Attachments (2)

2020-04-20-231812_405x248_scrot.png (10.5 KB) - added by simon04 8 months ago.
19127.patch (3.0 KB) - added by simon04 8 months ago.

Download all attachments as: .zip

Change History (11)

Changed 8 months ago by simon04

Changed 8 months ago by simon04

Attachment: 19127.patch added

comment:1 Changed 8 months ago by Klumbumbus

Good idea. One little thing might be good: if I understand right you hardcoded Nominatim? Better use the search engine the user chose at wiki:Help/Action/Download#Areaaroundplaces. Currently there is only Nominatim available, but once we add another again we'll probably forget to adapt the jump to position dialog.

comment:2 in reply to:  description ; Changed 8 months ago by Hb---

Replying to simon04:

  1. [...], the map view moves to the first result

Well, fine for the unique "Innsbruck". But what about "Kirchdorf" (32 locations) or "Neustadt" (51 locations)?

comment:3 in reply to:  2 Changed 8 months ago by skyper

Replying to Hb---:

Replying to simon04:

  1. [...], the map view moves to the first result

Well, fine for the unique "Innsbruck". But what about "Kirchdorf" (32 locations) or "Neustadt" (51 locations)?

Do not forget Springfield !

comment:4 in reply to:  1 Changed 7 months ago by simon04

Replying to Klumbumbus:

One little thing might be good: if I understand right you hardcoded Nominatim? Better use the search engine the user chose at wiki:Help/Action/Download#Areaaroundplaces. Currently there is only Nominatim available, but once we add another again we'll probably forget to adapt the jump to position dialog.

Currently, the logic of handling multiple servers is inside the UI class source:trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java
When we add an additional geocoder, we'll very likely have to adapt/generify the parsing code as well. I don't really see the point in making this code generic considering that Nominatim has been the only geocoder since r4422.

Btw: I'm co-maintaining the JavaScript library leaflet-control-geocoder which offers a uniform interface for 11 geocoders (some/most requiring an API token).

comment:5 in reply to:  2 Changed 7 months ago by simon04

Replying to Hb---:

Well, fine for the unique "Innsbruck". But what about "Kirchdorf" (32 locations) or "Neustadt" (51 locations)?

I'm aware of the ambiguity. The solution is easy: make the query more specific, such as Neustadt, Hesse or Neustadt, Kronstadt

For this feature, I'd like to follow the approach "immediate result, reiterate if necessary" instead of providing an additional dialog for selecting the right entry (since there will almost always be something to choose from).

comment:6 Changed 7 months ago by simon04

Resolution: fixed
Status: assignedclosed

In 16402/josm:

fix #19127 - Jump to Position: jump to place name

comment:8 Changed 6 months ago by simon04

Milestone: 20.05

comment:9 Changed 6 months ago by Klumbumbus

There is one comment on facebook about the new box. Not sure if we really want to make an advanced preference to hide this box. Or move it to the bottom. But I think on the top it is better because if you use lat and lon you anyway need to use tab or mouse. (However I don't use jump to position at all.)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain simon04.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.