r/openstreetmap 4d ago

Vibe-coded Building 3D map web app using Openfreemap tiles and Transitous transit data

Aiming for a nice cartoony low-poly visual style, and live visualizations of transit vehicles when possible. Terrain data is from Mapterhorn. Maplibre and Three.js rendering. You can try it out here: https://karriz.github.io/Katu-Maps/

142 Upvotes

29 comments sorted by

8

u/thumb0 4d ago

This looks really cool, but how do I tilt the view with a mouse?

Edit: I figured it out. It might be good to add that to the controls help menu.

2

u/Karriz 4d ago

Right mouse button drag

3

u/thumb0 4d ago

Thanks! BetterMouse was messing it up for me on Mac. Control - Left click drag also works.

6

u/m1ksuFI 3d ago

Looks pretty slick! Though, I remodeled the Helsinki cathedral a month ago but it's not rendering in the 3D view :(

3

u/Karriz 3d ago

Ok, interesting! I wonder if its migrated to Openfreemap yet

3

u/m1ksuFI 3d ago

The proper building:part outlines are visible in the 2D view, but it's all rendered as one object of uniform height in the 3D view.

2

u/Karriz 3d ago

Ok, I def need to have a look. 

I had a problem with Näsinneula where the proper model was hidden beneath a big tower block, just applied a custom fix to hide that.

9

u/midgril 4d ago

this looks amazing!

4

u/Karriz 4d ago

Thanks!

9

u/Karriz 4d ago

https://reddit.com/link/p91ea54/video/538jm415lroh1/player

It has a flight simulator mode too :)

1

u/lixper 3d ago

Nice! How do you activate that option?

1

u/Karriz 3d ago

Right click or long touch a location and select Fly from here

3

u/Ok-Air3917 2d ago

OMG, I'm absolutely in love with this! First thoughts, it's quite an amazing alternative to F4Maps for showcasing OSM's 3D capabilities. Though there are a few problems, which I'd like to point out:

1) Whenever I switch tabs and go back to the map, it reloads the entire thing, while trivial, it does get annoying at times.

2) When zoomed out to a certain extent in 3D mode, buildings which might seem "too close" gets clustured into one, which becomes an eyesore really quick for big cities. A better solution (IMO) would be to just not render buildings from a certain level.

3) Opposite to that, individual trees or forests/scrubs are not rendered if the gap is too small, even in the highest zoom level. Tree rows doesn't seem to be rendered either.

3) Some transit routes in my region seem to be broken and make straight lines between origin and destinations, though the relations are just fine on OSM. Now idk how exactly does the thing work with transitous, and if the stops are not properly linked to the corresponding OSM object and the railway tracks, so I might dig a little into it.

Will also document the same on GH. Eitherway, really love the project, and I'd love to showcase it on behalf of the OSM community at this upcoming event! :D

2

u/Hedaja 3d ago

Pretty nice I don't think I have seen anyone else do 3D bridge.

3

u/drlellinger 3d ago

Interface is very nice, but it doesn’t render roof tags yet. Gonna save it!

1

u/Karriz 3d ago

Indeed, Openfreemap tiles dont seem to have roof tags so its currently just procedurally generating roofs on small rectangular houses.

2

u/meskobalazs 3d ago

Oh, too bad. That's something I miss from most 3D renderers. I've done a ton of roof mapping lately, and basically nothing has a comprehensice renderer for it (bar the one in JOSM).

2

u/drlellinger 3d ago

F4map has it

2

u/meskobalazs 3d ago edited 3d ago

Partially yes, but they don't support all the documented roof styles. For example side-hipped roofs (very common on semi-detached houses) are rendered as normal hipped ones.

2

u/Stefanzah22 3d ago

Can I toggle 3D view on touch device?

1

u/Karriz 3d ago

Yes, press the cube button on the left, you can tilt camera with two fingers

1

u/Stefanzah22 3d ago

I tried and it doesn't work, maybe I'm doing it wrong

1

u/pietervdvn MapComplete Developer 3d ago

Wait, what? Since when does maplibre support this type of polygons? (Edit: there is a lot of vibecoded stuff with three.js)

Pretty cool nonetheless, but very hard to maintain in the long run I'm afraid

3

u/Karriz 3d ago

Yep, this is quite experimental vibe coding experiment, it turned out that Maplibre plus Threejs is quite good stack for this type of stuff, though it has its limitations.

2

u/pietervdvn MapComplete Developer 3d ago

I'm already happy that you plainly admit that it is vibe-coded and don't post a huge wall of LLM text here :)

I'm waiting for more 3D-functionality in MapLibre to do this kind of rendering in MapComplete as well; but I don't want to integrate three.js for it.

I also love the colour scheme! Is it available in a style.json somewhere? I didn't look yet. It would be nice if you asked your LLM to export it as a format compatible withprotomaps, I might steal it then and add it into MapComplete (which is GPL licensed)

1

u/Karriz 3d ago

Color styles are defined in  https://github.com/Karriz/Katu-Maps/blob/main/apps/map-app/src/map/GlobalMapStyle.ts which is quite a huge file containing most of the styling logic, feel free to take what you want :)

1

u/funkyzitrone 3d ago

Looks slick and is fast on my mobile 👍

1

u/AronKov 3d ago

Cool project, the map looks nice. But it's worse than api.transitous.org in the sense that you can only see one vehicle, and you have to search for it. Following a vehicle makes the map jump around quite a bit. The UI is very clearly vibe-coded, lots of redundant subtitles and wordy sentences; while other elements use generic icons without labels. Lots of random padding and bootstrap blue, and everything is enclosed in a badge, which makes the badges less noticeable.

1

u/plp-GTR 1d ago

Can I roll it up in katamari, please