"Show routing graph" for railway

I have implemented routing for rails. I need now to show all possible routes like on https://www.openrailwaymap.org/. At the moment /mvt just returns empty data. I assume I need to ovewrite MVTResource? Or what exactly? Thanks a lot.

1 Like

Depending on what you did for your railway implementation you might have to adjust MVTResource, yes. But also you might have to adjust the client-side, i.e. the JavaScript code that shows the routing graph on the map: graphhopper-maps/UseRoutingGraphLayer.tsx at master · graphhopper/graphhopper-maps · GitHub

1 Like

Thank you very much easbar. I made it working, my question is, is there a way to make it faster by caching it somehow? At the moment it is really slow.

I don’t know, but especially for a rails (only?) network it shouldn’t be that slow?! You also need to figure out if the server-side retrieval of the MVT tiles is the bottleneck, or rather the client-side rendering in the browser.

1 Like

Client-side rendering is the issue, backend is working fine actually.

Ok, but is it slower than the routing graph layer for the standard (road) network? I’d assume that for railways there isn’t much to be rendered anyway? What zoom levels are you working with, if you zoom out a lot there obviously is also more to be rendered.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.