Better-osm-org: a script that adds useful little things to osm.org

tldr; it’s hard, but I think about it and gradually delve into the website code.

  1. The site is written in Ruby + JavaScript, I don’t know Ruby, and some features should be implemented on the server side.

  2. Slow development speed. I don’t fully understand the structure of openstreetmap-website, but in my current environment (macOS + Docker) I have to wait for the JavaSctipt bundle to be built and the container to restart. To change the userscript, I just need to reload the tab in the browser.

  3. A very long discussion about PR. I’m too lazy to convince current maintainers of the changes I would like to see. You will not get links to external sites add link to open view in OSMCha, from changesets history pge · Issue #2629 · openstreetmap/openstreetmap-website · GitHub, you will not get vector tiles until they are perfect Add OpenMapTiles vector map by zdila · Pull Request #4042 · openstreetmap/openstreetmap-website · GitHub but at the same time, map dimming was easily turned on, which affected all users of the site ¯\_(ツ)_/¯ . How long do you think we’ll be discussing expert toggle? (: What should the visualization of changesets look like? (It’s worth writing an article, this is an interesting and complex question)

  4. A way to show PoC. It’s one thing to start an issue and convince people that things will get better, and another to show a working prototype. osm.ng is already inspired Tags diff mode · Issue #16 · openstreetmap-ng/openstreetmap-ng · GitHub (osm.ng in general, one big prototype of what it could be osm.org)

  5. I have two Pull Requests into the website that I hope to complete and open up interesting opportunities. Let’s see if I can handle hours of code reading and debugging :melting_face:

14 Likes

I fully understand your disillusionment, I too have shied away from writing code to contribute. If it took me over a month and multiple reviews just to get 20 lines of code merged to remove the carelessly implemented map dimming, I don’t see any reasonable possibility to get this plugin in there.

But the great thing about OSM is that it’s already a conglomerate of different projects, and features can grow even if others aren’t interested.

3 Likes

:zap: Faster rendering

My first PR was merged to openstreetmap-website code, and now the Map Data layer loads instantly. Be sure to try it. Thanks to the maintainers for help!

For the script, this means a huge acceleration in rendering large relations and GPS tracks (yes, tracks, read more!):

better0.8-speed

icon :busts_in_silhouette: near relations is clickable :wink:

:camera_flash: Photos from Panoramax, StreetComplete, Wikipedia Commons

Now they are displayed directly on the website. In notes, in tag history, and in changesets.

:man_running: Rendering of GPS tracks

Finally, by opening the starting coordinate of the track, you will be able to see the entire GPX track on the map:

better0.8-track

Let me remind you that the Z key allows you to fit an object on the screen.

The track is also drawn when opening notes from StreetComplete

The rendering of tracks is still very simple, if you have any examples of successful visualizations, please share them.

:speech_balloon: Comments on changesets

Now you don’t have to open the changesets to understand if there is an interesting discussion or if this is another revert of vandalism.

by the way, long links like *.openstreetmap.org replaced by *.osm.org

:people_hugging: Edits of friends

Did you know that OSM has a friends feature? You can even follow their edits here: osm.org/history/friends

better-osm-org can now filter changesets on this page. The script also tries to show around the username that it’s your friend.

Let’s be friends :slight_smile: osm.org/user/TrickyFoxy/follow

:artificial_satellite: Satellite image Switch (Firefox only)

Satellite images could be switched using the S key, or using the button on the side of the note.
But what about Firefox for Android? And how do I find out about S? Now there is a button in the right panel for this.

better0.8-satellite-switch

Pressing the Shift key will show you the ESRI Beta images. But be patient, because they take longer to load.

:page_facing_up: Experimental viewer for geotagged photos, .gpx and .geojson files

If we can now quickly render data, then why not be able to open it from files? Just drag them onto the map:

better0.8-drag-and-drop

p.s. for now, it’s more of a PoC, feel free to suggest your ideas.

:keyboard: Hotkeys

Where without them? :slight_smile:

  • ` — hide the geometry of the changeset from the map
  • T — toggle between compact and full tags diff mode
  • F — filter changesets
  • Hotkeys on user profile Page (H — user changesets history, T — tracks, D — Diary, C — comments, N — notes)
  • U — open user profile from changeset, note, …
  • Shift + U — open your profile

By the way, do you know about the new feature of the site? osm.org/user/SomeoneElse/changeset_comments


update link

16 Likes

Thanks for the update. What is “http: // localhost:3000” used for?
grafik

localhost:3000 is the address of osm-website if you run it locally

2 Likes

This is the default port for the local instance of openstreetmap-website: openstreetmap-website/INSTALL.md at master · openstreetmap/openstreetmap-website · GitHub

It seems that this feature is only used by me, so I will disable it. Moreover, I can override @includes in Tampermonkey

upd: deleted it

2 Likes

A fun-fact that was written to me in the comments: recently, there are no more friends in OSM (: Now it’s Followings. Only the mention in the URL remains.

2 Likes

Hi,
dragging the red/green routing markers onto the map does not work for me since the update.
When I de-activate tampermonkey it’s working.
grafik

upd: fixed in 0.8.1

oops, I’ll try to fix it soon. For now, you can disable the option in the script settings: “Drag&Drop for .geojson, .jpg, .gpx”

p.s. Duplicate photos from Wikimedia Commons will also be fixed

Congratulations! And thanks so much. Data layer being slow was annoying for a long time.

2 Likes

@chris66 Never knew you could, yes the drag/drop of the pins does not work in me firefox either.

(always have right clicked on the departure/arrival spots and choose from the pop up menu… somehow feels like less mouse mileage)

image

edit: ones the pins are on the map you can drag them around to play/test different departure/arrival points.

edit2: Once the pins are on the map, the dragging from the left top routing frame to the map does work… most odd.

Even at 0.8.1? Or is the dragging not working without the script on?

Probably I was one of the first to pull in 0.8.1:O)… yes this is Thé release. I verified the BOO switch on TamperMonkey is green in the dashboard. Left bar has all the bells, the map tested both with geometry function on and off.

Thanks, in 0.8.1 it’s solved. :+1:

Wow, thanks for displaying the photos in StreetsComplete Notes, very usefull. :+1:

6 Likes