#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 , 12 years ago
comment:3 by , 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 , 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
comment:8 by , 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:10 by , 11 years ago
Cc: | added |
---|
follow-up: 12 comment:11 by , 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/
follow-up: 13 comment:12 by , 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.
comment:13 by , 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 , 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 , 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...
comment:16 by , 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:18 by , 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 , 11 years ago
Cc: | added |
---|
follow-up: 21 comment:20 by , 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?
comment:21 by , 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 , 11 years ago
Component: | Core → Plugin notes |
---|---|
Owner: | changed from | to
comment:23 by , 11 years ago
Status: | new → assigned |
---|
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 , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:25 by , 11 years ago
Component: | Plugin notes → Core |
---|
Aside from closing I have verified that it works now. Thanks.
comment:26 by , 11 years ago
Component: | Core → Plugin notes |
---|
Looks like the launch of this new feature is imminent.