Modify

Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#8193 closed enhancement (fixed)

Support for OSM "notes"

Reported by: bastiK Owned by: ToeBee
Priority: normal Milestone:
Component: Core notes Version:
Keywords: Cc: Stemby, grinapo

Description

There will be an bug tracking system called notes similar OpenStreetBugs on the main OSM website. We should add support for this.

http://lists.openstreetmap.org/pipermail/rails-dev/2012-October/001080.html

Attachments (0)

Change History (27)

comment:1 by Don-vip, 12 years ago

Looks like the launch of this new feature is imminent.

comment:2 by Don-vip, 12 years ago

It's live :)

comment:3 by stoecker, 12 years ago

If this is now official I think integrating OpenStreetBugs plugin and this system into core JOSM is a good idea.

comment:4 by Don-vip, 12 years ago

I agree but we need to be careful, because notes is not exactly the same as OpenStreetBugs, and OpenStreetBugs instance is still active AFAIK.

We should only integrate the parts of OpenStreetBugs plugin that are relevant to Notes, and add support for its new features (e-mail contact).

EDIT: There is not yet a complete documentation but I have asked for details here.

EDIT2: The API is described here: http://wiki.openstreetmap.org/wiki/API_v0.6#Map_Notes_API

Last edited 12 years ago by Don-vip (previous) (diff)

comment:5 by Don-vip, 12 years ago

Ticket #8675 has been marked as a duplicate of this ticket.

comment:6 by Manu1400, 12 years ago

I suggest to create a new JOSM plugin for support for OSM "notes".

comment:7 by Don-vip, 12 years ago

It is planned to do it directly into core, but this requires some work.

comment:8 by anonymous, 12 years ago

it would be sufficient to have a layer for notes in JOSM - most of the time the work can be done without it, but when the comment gives exact position, it is cumbersome to add the node at the right palce.

comment:9 by Stemby, 11 years ago

This ticket blocks #8840.

comment:10 by Stemby, 11 years ago

Cc: Stemby added

comment:11 by extropy, 11 years ago

It's 3 months already.

How long can this possibly take?
Just take OpenStreetBugs plugin and replace the URLs and have a working variant we can use.

The fact that it "is planned directly in core" discourages making a plugin and makes everybody just sit and wait.

/Troll mode off/

in reply to:  11 ; comment:12 by stoecker, 11 years ago

Replying to viesturz@…:

It's 3 months already.

How long can this possibly take?
Just take OpenStreetBugs plugin and replace the URLs and have a working variant we can use.

If it is so easy, then provide a patch. A simple Google search with "openstreetbugs api" and "Osm notes API" would show you, that these are two different things.

The fact that it "is planned directly in core" discourages making a plugin and makes everybody just sit and wait.

Whether it is a plugin or in core, the work is the same. Someone needs to write the interface. Currently nobody does this, so no progress.

If you need that feature, find someone who implements it or spend money to pay for implementation. But don't wonder when you find that such a task is worth more than a number with four digits.

in reply to:  12 comment:13 by apmon, 11 years ago

Replying to stoecker:

Replying to viesturz@…:

It's 3 months already.

How long can this possibly take?
Just take OpenStreetBugs plugin and replace the URLs and have a working variant we can use.

If it is so easy, then provide a patch.

It really should be that easy.

A simple Google search with "openstreetbugs api" and "Osm notes API" would show you, that these are two different things.

They are mostly very similar. Yes, they are no longer identical as they were originally planned, but predominantly they are changes in the parameter naming in the URL. The concept stayed pretty much the same.

Can you say what needs changing in the code other than going through all of the places where the URLs to talk to OSB are constructed and update them to the new schema?

The fact that it "is planned directly in core" discourages making a plugin and makes everybody just sit and wait.

Whether it is a plugin or in core, the work is the same. Someone needs to write the interface. Currently nobody does this, so no progress.

:-(

If you need that feature, find someone who implements it or spend money to pay for implementation. But don't wonder when you find that such a task is worth more than a number with four digits.

Compared to all of the other things going on in josm, this is a pretty minor task. So hopefully someone is willing to fix this pretty important and useful feature...

comment:14 by ToeBee, 11 years ago

Ian Dees and me worked on this today. We copied the OSB plugin code and went from there. Ian did some refactoring to take out the hackish practice of using the Node class to display notes on the map. As of now, note display works and adding comments as anonymous works.

The biggest issue is authentication. JOSM doesn't seem to have an easily accessible way of sending an authenticated HTTP request from outside of core. I came up with a hack of subclassing OsmConnection in order to give myself a proxy to call the protected addAuth method. This is working for basic auth but not for oauth and I'm not sure why. The oauth header is being added but the server is not recognizing it for some reason.

Our code is on GitHub. My initial attempt at doing auth is on a branch that may or may not survive:
https://github.com/iandees/josm-notes

comment:15 by bastiK, 11 years ago

Great! Glad to hear you got rid of the Node class hack. :)

As JOSM is probably the first external user of the Notes API (?) the problem with OAuth could in principle also be on the server side.

edit:
Should have read the wiki first: OAuth seems to work with this site: http://osmlab.github.io/osm-note/

The http header reads:

POST /api/0.6/notes.json HTTP/1.1
User-Agent: Opera/9.80 (X11; Linux x86_64) Presto/2.12.388 Version/12.10
Host: www.openstreetmap.org
Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
Accept-Language: en-US,en;q=0.9
Accept-Encoding: gzip, deflate
Referer: http://osmlab.github.io/osm-note/?oauth_token=#######
Connection: Keep-Alive
Content-Length: 36
Authorization: OAuth lat="0", lon="0", oauth_consumer_key="#########", oauth_nonce="#####", oauth_signature="########", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1373816587", oauth_token="#############", text="well%20mapped%20..."
Origin: http://osmlab.github.io
Content-Type: application/x-www-form-urlencoded

text content:

lat=0&lon=0&text=well%20mapped%20...
Last edited 11 years ago by bastiK (previous) (diff)

comment:16 by ToeBee, 11 years ago

For those of you watching this ticket, I did just put an initial version of the notes plugin out there. It has basic functionality but still needs work. Because of #8875, it needs josm-latest plus some manual tweaking to use OAuth. Please see the wiki page for more information: http://wiki.openstreetmap.org/wiki/JOSM/Plugins/Notes

comment:17 by extropy, 11 years ago

Awesome. Works like a charm. Not using OAuth.

Thank you so much.

comment:18 by extropy, 11 years ago

Non ASCII chars are not rendered correctly.
See http://www.openstreetmap.org/?lat=56.965657&lon=24.16492&zoom=18&layers=MN

Looks like new String(bytes, "UTF-8") is missing somewhere.

comment:19 by grinapo, 11 years ago

Cc: grinapo added

comment:20 by ToeBee, 11 years ago

Hmm that's odd. I actually tested it with some chinese text before I published the jar and thought everything was working. The note you linked to displays fine for me too. As far as I can tell, I should be getting an appropriately encoded string back from JOSM in the first place. Can anyone else confirm this?

in reply to:  20 comment:21 by grinapo, 11 years ago

Replying to ToeBee:

Can anyone else confirm this?

Yes, it's garbled for me, too, when checking Hungarian entries.

comment:22 by Don-vip, 11 years ago

Component: CorePlugin notes
Owner: changed from team to ToeBee

comment:23 by ToeBee, 11 years ago

Status: newassigned

For some reason everything worked when my locale was set to en_US.UTF8 but when I manually changed it to hu_HU.UTF8, things did indeed break. The fix was changing some code I copied straight out of the OsmApi class in core. I'm not sure why it broke since I'm pretty sure core doesn't have this problem... But regardless, please give it a try and make sure it is working. If so I guess I will close this ticket since the powers that be created a new Notes plugin component for trac so future problems can be filed as new tickets.

comment:24 by ToeBee, 11 years ago

Resolution: fixed
Status: assignedclosed

comment:25 by grinapo, 11 years ago

Component: Plugin notesCore

Aside from closing I have verified that it works now. Thanks.

comment:26 by Don-vip, 11 years ago

Component: CorePlugin notes

comment:27 by Don-vip, 11 years ago

Ticket #8910 has been marked as a duplicate of this ticket.

Modify Ticket

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