@@ -18,11 +18,20 @@ import {
1818 SetQueryPoints ,
1919 SetVehicleProfile ,
2020} from '@/actions/Actions'
21- import { RoutingArgs , RoutingProfile } from '@/api/graphhopper'
22- import { calcDist , Coordinate , ProfileGroupMap } from '@/utils'
21+ import { Bbox , RoutingArgs , RoutingProfile } from '@/api/graphhopper'
22+ import { calcDist , ProfileGroupMap } from '@/utils'
2323import config from 'config'
2424import { customModel2prettyString , customModelExamples } from '@/sidebar/CustomModelExamples'
2525
26+ export interface Coordinate {
27+ lat : number
28+ lng : number
29+ }
30+
31+ export function getBBoxFromCoord ( c : Coordinate , offset : number = 0.005 ) : Bbox {
32+ return [ c . lng - offset , c . lat - offset , c . lng + offset , c . lat + offset ]
33+ }
34+
2635export interface QueryStoreState {
2736 readonly profiles : RoutingProfile [ ]
2837 readonly lastProfiles : Record < string , string >
@@ -35,6 +44,13 @@ export interface QueryStoreState {
3544 readonly customModelStr : string
3645}
3746
47+ export interface CustomModel {
48+ readonly speed ?: object [ ]
49+ readonly priority ?: object [ ]
50+ readonly distance_influence ?: number
51+ readonly areas ?: object
52+ }
53+
3854export interface QueryPoint {
3955 readonly coordinate : Coordinate
4056 readonly queryText : string
0 commit comments