Modify

Opened 4 months ago

Closed 2 months ago

Last modified 2 months ago

#24298 closed enhancement (fixed)

Add the ability to know the OSM server via Remote Control

Reported by: TrickyFoxy Owned by: TrickyFoxy
Priority: normal Milestone: 25.06
Component: Core remotecontrol Version:
Keywords: Cc:

Description (last modified by TrickyFoxy)

I added an osm_server_url field to the /version command response with the user's current OSM server.

{
  "protocolversion": {
    "major": 1,
    "minor": 13
  },
  "application": "JOSM RemoteControl",
  "version": 19402,
  "osm_server_url": "https://api.openstreetmap.org/api"
}

I am writing an extension that makes heavy use of Remote Control in JOSM. For example, to revert changesets or open objects in JOSM. The extension supports working with the API sandbox, but the user may forget to change the OSM server in the settings. [1] In the best case, an error will occur, in the worst case, you will corrupt the user's layer or, even worse, he will not notice this and send the changes to the server.

Therefore, I propose to give external tools the ability to check the current OSM server. Since most users do not change this setting, I do not see any risk of disclosing private information.

Patch note: I replaced the static field with a static method because the OSM server can be modified while JOSM is running.

[1] https://github.com/deevroman/better-osm-org/issues/258

Attachments (2)

Change History (9)

comment:1 by TrickyFoxy, 4 months ago

Description: modified (diff)

comment:2 by stoecker, 4 months ago

Milestone: 25.05

comment:3 by stoecker, 3 months ago

Owner: changed from team to TrickyFoxy
Status: newneedinfo

Even after some time passed I don't like this much as it is.

Would it be OK for you to only get "default" (when matching the default API) and "custom" (when not) as values? Can you change the patch accordingly?

comment:4 by stoecker, 3 months ago

Milestone: 25.0525.06

comment:5 by TrickyFoxy, 2 months ago

Yes, that's OK too. I don't think we have many mappers who edit OpenHistoricalMap and OpenGeofiction at the same time :)

Renamed osm_server_url to just osm_server.

comment:6 by stoecker, 2 months ago

Resolution: fixed
Status: needinfoclosed

In 19416/josm:

fix #24298 - add JOSM API indication to remote control

comment:7 by stoecker, 2 months ago

In 19417/josm:

see #24298 - add JOSM API indication to remote control - fix PMD

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain TrickyFoxy.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.