Modify

Opened 7 years ago

Closed 3 months ago

Last modified 3 months ago

#5869 closed enhancement (fixed)

history of last edits in download-dialog

Reported by: malenki Owned by: team
Priority: major Milestone: 17.07
Component: Core Version:
Keywords: bookmark download home changeset history Cc: bastiK, michael2402

Description

I'd find it helpful to have the history of the last, let's say ten, edits with comment and the region where one worked at. Maybe this could be put on the bookmark-tab as "automatically saved bookmark".
The number of automatically saved edits could be edited in advanced settings.

Attachments (4)

home_osm.PNG (175.5 KB) - added by Don-vip 3 months ago.
home_josm1.PNG (8.3 KB) - added by Don-vip 3 months ago.
hom_josm2.PNG (64.0 KB) - added by Don-vip 3 months ago.
home_bookmark.patch (7.1 KB) - added by Don-vip 3 months ago.

Download all attachments as: .zip

Change History (15)

comment:1 Changed 6 years ago by simon04

I like the idea! Unfortunately, this request is not possible with API 0.6 and I think that parsing the corresponding HTML page should not be implemented.

comment:2 Changed 6 years ago by malenki

It would be sufficient if JOSM stored this data locally from the previous uploads.

comment:3 in reply to:  1 Changed 4 years ago by Don-vip

Replying to simon04:

Unfortunately, this request is not possible with API 0.6

What about GET /api/0.6/changesets ? The response does contain changesets bounding box.

comment:4 Changed 3 months ago by Don-vip

Keywords: bookmark download home changeset history added

Changed 3 months ago by Don-vip

Attachment: home_osm.PNG added

Changed 3 months ago by Don-vip

Attachment: home_josm1.PNG added

Changed 3 months ago by Don-vip

Attachment: hom_josm2.PNG added

Changed 3 months ago by Don-vip

Attachment: home_bookmark.patch added

comment:5 Changed 3 months ago by Don-vip

Cc: bastiK michael2402 added

I started to work on this. Before implementing the latest changeset entries I wanted to add a simple bookmark to the "home location" I have defined in my user profile on osm.org website (at zoom level 3):


It works but I couldn't find the right API call to translate the zoom level to expected scale. I found out the factor was about 50000 in my case, can someone please give me a hint to replace this hardcoded value properly?



    /**
     * A specific optional bookmark for the "home location" configured on osm.org website.
     * @since xxx
     */
    public static class HomeLocationBookmark extends Bookmark {
        /**
         * Constructs a new {@code HomeLocationBookmark}.
         */
        public HomeLocationBookmark() {
            setName(tr("Home location"));
            setIcon(ImageProvider.get("help", "home", ImageSizes.SMALLICON));
            final UserInfo info = JosmUserIdentityManager.getInstance().getUserInfo();
            if (info == null) {
                throw new IllegalStateException("User not identified");
            }
            final LatLon home = info.getHome();
            if (home == null) {
                throw new IllegalStateException("User home location not set");
            }
            final int zoom = info.getHomeZoom();
            Projection mercator = Projections.getProjectionByCode("EPSG:3857");
            setArea(MapViewState.createDefaultState(430, 400) // Size of map on osm.org user profile settings
                    .usingProjection(mercator)
                    .usingScale(Selector.GeneralSelector.level2scale(zoom) / 50000)
                    .usingCenter(mercator.latlon2eastNorth(home))
                    .getViewArea()
                    .getLatLonBoundsBox());
        }
    }

comment:6 in reply to:  5 Changed 3 months ago by Don-vip

Replying to Don-vip:

the "home location" I have defined in my user profile on osm.org website (at zoom level 3):

Mmm I guess part of the problem is that I defined it at level 12, but the OSM API replies level 3...

comment:7 Changed 3 months ago by bastiK

level2scale returns scale in centimetre per px and usingScale expects scale argument to be in east/north units per pixel.

comment:8 Changed 3 months ago by Don-vip

Milestone: 17.07

ok thanks, it works now :) I reported the issue to OSM API: https://github.com/openstreetmap/openstreetmap-website/issues/1592

Last edited 3 months ago by Don-vip (previous) (diff)

comment:9 Changed 3 months ago by Don-vip

Resolution: fixed
Status: newclosed

In 12495/josm:

fix #5869 - Download dialog, bookmarks: add "home location" bookmark (if set in OSM user settings) + last 15 changesets bookmarks

comment:10 Changed 3 months ago by Klumbumbus

Priority: normalmajor

Great new feature!

comment:11 Changed 3 months ago by Don-vip

In 12515/josm:

see #5869 - javadoc

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.