Modify

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#10503 closed enhancement (fixed)

Note download code

Reported by: ToeBee Owned by: team
Priority: normal Milestone: 14.09
Component: Core notes Version:
Keywords: Cc:

Description

Well here is my core download code. You might want to give the first patch a little more scrutiny. The DownloadNotesTask class kind of got away from me. It works but on the other hand it has an abstract inner class which seems... odd. The whole download task code is kind of a maze of subclasses so when I got something that worked, I decided to submit what I have and see what others think.

The second patch is much simpler. It lets you actually download notes in the UI.

The first way is through the "Open Location" dialog which will now accept a URL with .osn or .osn.bz2 at the end. You can point it straight at http://planet.osm.org/notes/planet-notes-latest.osn.bz2 to see it in action.

The second way to download notes is to set the preference option osm.notes.enableDownload to true. This will mimic the eventual desired behavior of having a "Download Notes" checkbox in the standard download dialog. But since the notes layer obviously isn't ready for use yet I decided to do it with this hidden option for now.

Attachments (2)

notesDownload.patch (14.1 KB) - added by ToeBee 5 years ago.
enableDownload.patch (2.4 KB) - added by ToeBee 5 years ago.

Download all attachments as: .zip

Change History (6)

Changed 5 years ago by ToeBee

Attachment: notesDownload.patch added

Changed 5 years ago by ToeBee

Attachment: enableDownload.patch added

comment:1 Changed 5 years ago by bastiK

Looks alright to me, are you missing an = sign in the line

        .append("notes?limit")

?

comment:2 Changed 5 years ago by ToeBee

I believe you are correct. Apparently the API is rather forgiving in its parsing of parameters.

comment:3 Changed 5 years ago by bastiK

Resolution: fixed
Status: newclosed

In 7531/josm:

applied #10503 - Note download code (patch by ToeBee)

comment:4 Changed 5 years ago by Klumbumbus

Component: CoreCore notes
Keywords: notes removed

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.