Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#8586 closed enhancement (fixed)

synchronize GET /imagery? remote control

Reported by: A_Pirard Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: Cc: A_Pirard

Description

Imagery layers can exist if no "Data Layer" is open (open data, open imagery, close data).
But GET /imagery? remote control will return code 4 if no data layer (window) is open.
Furthermore, I could not find a nondestructive control to determine if such a window is open.
So, either GET /imagery? should work in a no-data-window state, best option,
or some read-only control, e.g. /version? should tell when it can work.
This would allow a script to open favorite imagery at JOSM startup.

Another issue is that imagery starts in the Show state.
When their number is high, starting in Hide state would be appreciated.

Attachments (0)

Change History (2)

comment:1 Changed 7 years ago by Don-vip

Resolution: fixed
Status: newclosed

In 5837/josm:

fix #8586 - Remote Control: allow imagery handler to work without any mapFrame + add wiki link in HTTP 400 error message

comment:2 Changed 7 years ago by A_Pirard

It works great! Thanks!
Just that sometimes JOSM becomes unresponsive while executing the second wget in josm-layers script.
Its window is all white and it has to be killed.
Difficultly reproducible and I didn't see it happen if an extra sleep 1 is added.

JAVA_OPTS="-Xmx738M" josm &
for ((t=0; t < 120 ; t++)); do
# looop until JOSM remote control port opens
  wget -nv -O- "localhost:8111/version?" && break
  echo remote control attempt after $t sec returned code $?
  sleep 1
done
sleep 1
josm-layers

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
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.