Make public transport routes discoverable with shareable search
Add one-click examples and route search by number or metadata, with transport type, location and map-area filters. Preserve search filters and bounds in shareable URLs and restore searches on reload and browser navigation. Validate with 91 passing tests, including desktop and mobile browser coverage, and strict mypy checks. Closes #2
This commit is contained in:
parent
29afb4f115
commit
a79b0a7098
7 changed files with 919 additions and 12 deletions
15
README.md
15
README.md
|
|
@ -76,6 +76,19 @@ routes as GeoJSON.
|
|||
|
||||
#### Features
|
||||
|
||||
- Search worldwide for public transport routes by route number, name,
|
||||
destination, operator or network, with an optional transport type filter.
|
||||
Click a result to load it; search uses Overpass and shows up to 50 matches.
|
||||
- Narrow a route search with a location (for example, route `24`, location
|
||||
`Bristol, UK`, transport type `Bus`). Choose a matching place to centre the
|
||||
map and show its search boundary, or tick **Search this map area** to use
|
||||
the current view instead. Routes may extend outside the search area.
|
||||
- Share or bookmark the page URL after searching. It saves the route text,
|
||||
transport type, selected location and exact area; opening it automatically
|
||||
restores the filters and matching route list. Back and Forward restore
|
||||
previous searches. Results reflect the latest OpenStreetMap data.
|
||||
- Start with one-click examples: Bristol airport bus A1, Istanbul Metro M11,
|
||||
or all M11 directions. No relation ID lookup is needed to try the tool.
|
||||
- Enter a relation ID or OSM URL to load a route onto the map.
|
||||
- Click stops in the sidebar list or on the map to set start and end points.
|
||||
- Preview the selected segment highlighted on the map.
|
||||
|
|
@ -101,6 +114,8 @@ when the server is running.
|
|||
|
||||
| Endpoint | Description |
|
||||
|---|---|
|
||||
| `GET /api/search?q=TEXT[&mode=TYPE][&south=S&west=W&north=N&east=E]` | Find public transport route relations, optionally within an area |
|
||||
| `GET /api/locations?q=PLACE` | Find candidate locations and their search bounds |
|
||||
| `GET /api/route/<id>` | Full route GeoJSON, stop list, and sibling routes |
|
||||
| `GET /api/segment/<id>?from=NAME&to=NAME` | Segment between two named stops |
|
||||
| `GET /api/route_master/<id>` | All member routes of a route_master |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue