diff --git a/config/frontend.example.js b/config/frontend.example.js index 4b3c3e3..b418dfa 100644 --- a/config/frontend.example.js +++ b/config/frontend.example.js @@ -2,10 +2,16 @@ import { DEFAULT_PROVIDER, PROVIDERS } from '$constants/providers'; const API_ADDR = 'https://HOSTNAME.org:3000'; const OSRM_URL = 'https://HOSTNAME.org:5001/route/v1'; +const OSRM_PROFILE = 'bike'; +const OSRM_TEST_URL = ([south_west, north_east]: [LatLngLiteral, LatLngLiteral]) => ( + `${OSRM_URL}/${OSRM_PROFILE}/${Object.values(south_west).join(',')};${Object.values(north_east).join(',')}` +); export const CLIENT = { OSRM_URL, API_ADDR, + OSRM_TEST_URL, + OSRM_PROFILE, STROKE_WIDTH: 5, }; diff --git a/src/index.tsx b/src/index.tsx index c3c9faa..8d82d76 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -2,7 +2,7 @@ ## BUGS - todo moving out the screen makes stickers editable again + ## FEATURES @@ -26,6 +26,7 @@ todo maybe: map preview on save (nope) done maybe: stickers clusterization? + done moving out the screen makes stickers editable again ## DONE done fix arrows (can't reproduce now :-( ) diff --git a/src/modules/Router.ts b/src/modules/Router.ts index ec69bed..50f070e 100644 --- a/src/modules/Router.ts +++ b/src/modules/Router.ts @@ -38,7 +38,7 @@ export class Router { this.router = Routing.control({ serviceUrl: CLIENT.OSRM_URL, - profile: 'bike', + profile: CLIENT.OSRM_PROFILE, fitSelectedRoutes: false, showAlternatives: false, routeLine,