OpenStreetMap logo OpenStreetMap

Note Viewer

Posted by Anton Khorev on 22 March 2022 in English.

Sometimes you add a bunch of notes and need to look at them later. Or someone adds notes and you need to look at their notes. Or someone does something with a lot of notes like closing without a good reason or leaving useless comments and you need to look at them. How do you do it? There is a link from the profile page to user’s notes. You go there and you’ll see a list of notes with their opening comments and current statuses. The problem is it’s cumbersome to use. You don’t get to see where the notes are located unless you click each one separately, then you’ll see only that one note.

What if we want to see all of the notes? Actually, how about we just see everything known about the notes on one page? That’s what I’ve done here. You can enter a username and load as many notes as you need. They are going to be displayed in a table with all their comments and status changes. Also their markers are going to be added to a map on the same page. You can find the marker corresponding to a table entry by clicking it and vice versa. There are also some commands available below the table, like loading selected notes into an editor with remote control.

Another problem with the notes page on the osm website is when we don’t want to see all of the user’s notes. What are the user’s notes anyway? Note records in the database don’t have direct references to users. The references are found in comment and action records. So the user’s notes are the ones opened, closed or commented by the user. But what if you only want to see only the notes that you’ve opened? On my notes page you still have to load all your notes because that’s how the OSM API works. After that you can use the filter to hide unwanted notes. To see only notes you created yourself, use this filter expression:

user = YourName, action = opened

It’s possible to do more elaborate filtering. Maybe you want to check if someone closed notes opened by you. Here’s a filter for that:

user = YourName, action = opened
*
user != YourName, action = closed

Now let’s talk about the limitations of this tool. Displaying everything on one page may slow down the browser if there’s too much information. Normally, the next batch of notes is downloaded when you scroll down to the end of the table. This feature is turned off after a large enough number of notes is fetched. You can also turn it off yourself using the checkbox in the download form. Also because the data is stored in the browser’s local storage, it’s possible to run out of available space there. Couple of thousand notes should be fine though. And it’s assumed that there’s only one instance is open, so only one set of notes is remembered by the browser. All of these limitations are fixable and probably soon will no longer exist.

Here’s the source code.

Here’s a post in Russian describing one of the applications of this tool.

Email icon Bluesky Icon Facebook Icon LinkedIn Icon Mastodon Icon Telegram Icon X Icon

Discussion

Comment from benoitdd on 24 March 2022 at 09:09

Yeah! one more usefull tool to deal with the notes!

I really like the symbol showing how many interactions happened on the note.

I don’t get why there is lines linking the notes

Comment from Anton Khorev on 24 March 2022 at 14:35

The the marker reflecting interactions and the line are experimental features.

The idea behind the lines was to show a sequence of notes on the map as if it was a gps track. If I created note A, then note B, then note C, there would be a line connecting A and B, then B and C. Currently it doesn’t work exactly like that. It connects the notes that are scrolled into view in the table, and they are connected in the order they appear in the table (which is not necessarily a creation order).

The marker symbols are to quickly find more “interesting” notes, the ones that had many interactions. Interactions are represented by kind of tree rings, with the oldest state inside, then newer states added around it. One problem with that is there’s limited amount of space to display the rings. Also, the first state is redundant because all notes start as open. That means if I followed through my tree rings analogy, all note markers would have red cores. That would just add visual noise. I’m experimenting with other marker shapes to see if they fit better.

Comment from AngocA on 28 March 2022 at 20:39

Hi Anton, Excellent tool. I included in one entry of my diary. In fact, I have leed the notes resolution in Colombia, and now we are working on this at Latinamerican level. I will propose your tool to solve notes, as one of the several tools used when working on notes.

Andres Gomez - AngocA

Log in to leave a comment