Modify

Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#8142 closed enhancement (fixed)

Remote control doesnt zoom to error from keepright

Reported by: fatbozz Owned by: team
Priority: normal Milestone:
Component: Core remotecontrol Version:
Keywords: zoom, keepright, bbox Cc:

Description

Hi !
I wrote some mails to developer of Keepright to make edits easier for JOSM users.
-
At first i was aking in IRC channel

(13:05:56) me: sometime josm dont load another way which i need to join via remote plugin - http://localhost:8111/load_and_zoom?left=14.063921&right=14.065921&top=49.9715375&bottom=49.9695375&select=node1788418377 i must download area about point additionally.
(13:06:41) me: street "Na Vinici" isnt loaded in that request :(
(13:08:02) me: taken from http://keepright.at/report_map.php?zoom=17&lat=49.96982&lon=14.06666&layers=B0T&ch=0%2C50&show_ign=0&show_tmpign=0 almost junction error
(13:11:47) jongleur: me: yes, sure
(13:12:36) jongleur: that's not a josm bug, but a well... bug if you want in the keepright generated link
(13:12:58) me: small area to download ?
(13:13:58) jongleur: well.. the josm remote link refers to a bounding box only, and the Na Vinici way does not have any node inside the bounding box
(13:14:34) jongleur: it would be possible to reformulate the josm remote link to explicitly refer to the two objects/ways explicitly, I think, but that's part of the keeright-code
(13:15:09) me: ok, ill write to keepright admins

Then Harald "fix" that.

Hi again,

I just released an update that builds more advanced JOSM URLs selecting all objects taking part in the error. If you find any issues with this please let me know

thank you!

But on long ways it was this method worse.

Hi !
Thanks for fix. I see that all objects are loading well. But i dont know if its worse or not. For example http://keepright.at/report_map.php?schema=80&error=34308136 and see cliboard01.png . Way is selected but lots of useless kilometers too :) Find "bug" at first look there. Its easy there, because not much points, ways in area. But in town its a dissaster. Is possible to zoom on area where error occurs, not on area where are object selected ?

The last message from Harald is that JOSM is ignoring bbox in remote control. And thats my question now. Should be possible to add support zoom to bounding box that comes from Remote control ?

...clueless about what to do next.
JOSM obviously sets the viewport ignoring the bbox I provide, instead fitting all objects that I select.
The solution is easy and impossible at the same time: I could post two requests:
first: localhost:8111/load_and_zoom?[bbox]&select=[obect1,object2...]
and second:
localhost:8111/zoom?[bbox]

the second call doesn't change selection, it only zooms back to the desired center and zoom level.
I tried to implement these two calls within a JavaScript function. But it looks like the same origin policy doesn't allow me to do that. The calls aren't executed.
I could put two hyperlinks on the error bubble but that's too ugly

If I don't have any new idea on this I'll have to revert my last change.

Attachments (1)

Clipboard01.png (154.6 KB ) - added by fatbozz 13 years ago.
remote control that cant handle bbox which come from keepright - see little bbox on left side

Download all attachments as: .zip

Change History (7)

by fatbozz, 13 years ago

Attachment: Clipboard01.png added

remote control that cant handle bbox which come from keepright - see little bbox on left side

comment:1 by simon04, 12 years ago

In fact, JOSM does exactly what load_and_zoom says: it loads the bbox, selects the specified objects and zooms to their extent.

To deal with your problem, we could add an optional parameter zoom_mode=(bbox|selection) which would zoom to the downloaded area, or the extent of the selected objects, respectively.

comment:2 by keepright@…, 12 years ago

Hi simon04,

I see the current behaviour isn't an error, it just isn't optimal for my use case.
the new parameter you suggest is a great enhancement for use with KeepRight! I'm the first user for that

Thank you very much,

Harald
keepright@…

comment:3 by skyper, 12 years ago

Type: defectenhancement

comment:4 by simon04, 12 years ago

Resolution: fixed
Status: newclosed

In 5600/josm:

fix #8142 - Remote control: add zoom_mode parameter to load_and_zoom handler

comment:5 by anonymous, 12 years ago

Thank you very much, it works!

just for curiosity: did you really want to call the first option "download" instead of "bbox" (that's the way it is in the sources)

best regards,
Harald

comment:6 by simon04, 12 years ago

That was intended. I thought it was more clear. In the end it is just a random naming decision … :-)

Grüße aus Tirol!

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. 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.