vmarc / knooppuntnet

Route planner and quality assurance for walking and cycling networks in OpenStreetMap.
MIT License
31 stars 6 forks source link

Safari JOSM remote control #282

Open vmarc opened 1 year ago

vmarc commented 1 year ago

The current mechanism for JOSM remote control does not work in a Safari browser with the standard security settings.

An attempt to use the remote control function results in following error message:

[Warning] [blocked] The page at https://knooppuntnet.nl/en/monitor/groups/fr-nwn/routes/GR9/map 
  was not allowed to display insecure content from 
  http://localhost:8111/zoom?left=5.71663525&right=5.74048406&top=43.3849624&bottom=43.37447519

Thanks to @pyrog for reporting this problem (telegram).

vmarc commented 1 year ago

A test shows JOSM remote control can be made to work in the Safari browser by opening the JOSM links in a separate browser tab.

Although remote control works this way, there is no way for the knooppuntnet application to know whether JOSM has accepted the command, or even whether JOSM has been started and has remote control enabled. There is some feedback in the second browser tab where the "OK" response from JOSM is displayed.

Tests have been done to verify whether some feedback can be obtained by opening the link in an iframe, but this did not work.

Given the lack of feedback, the only thing knooppuntnet can do is to wait for a bit between separate commands (for example 1 second), and hope for the best. In practice this may actually be good enough.

pyrog commented 1 year ago

OSMCha manage "correctly" JOSM remote control under Safari. It open the remote control in a new tab (cf. source code)

pyrog commented 5 months ago

Todo