Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 49x 29x 1x | import type { Map } from "mapbox-gl";
import { getRouteGeometry as loadGeometry } from "@overworld/routing";
import { setRoutes as installRoutes, showNearbyRouteLines as showLines } from "@overworld/maps/transit";
import type { NearbyRouteDirections } from "@overworld/maps/transit";
export { addMapboxLayer, removeRoutes, NEARBY_ROUTE_LINES } from "@overworld/maps/transit";
export function getRouteGeometry(routeId: string, directionId: number, signal?: AbortSignal) {
return loadGeometry(routeId, directionId, { baseUrl: process.env.PUBLIC_URL || "", signal });
}
export function showNearbyRouteLines(map: Map, routes: NearbyRouteDirections) {
return showLines(map, routes, getRouteGeometry);
}
export function setRoutes(map: Map, routes: NearbyRouteDirections) {
return installRoutes(map, routes, getRouteGeometry);
}
|