Skip to content

Commit

Permalink
remove road_access
Browse files Browse the repository at this point in the history
  • Loading branch information
karussell committed Dec 16, 2023
1 parent 4f372aa commit f1406d0
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 30 deletions.
1 change: 0 additions & 1 deletion config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const config = {
details: [
'road_class',
'road_environment',
'road_access',
'surface',
'max_speed',
'average_speed',
Expand Down
1 change: 0 additions & 1 deletion src/api/graphhopper.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ interface Details {
readonly toll: [number, number, string][]
readonly max_speed: [number, number, number][]
readonly road_class: [number, number, string][]
readonly road_access: [number, number, string][]
readonly road_environment: [number, number, string][]
readonly track_type: [number, number, string][]
readonly country: [number, number, string][]
Expand Down
21 changes: 0 additions & 21 deletions src/sidebar/RoutingResults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,6 @@ function RoutingResult({
const fordInfo = getInfoFor(path.points, path.details.road_environment, { ford: true })
const tollInfo = getInfoFor(path.points, path.details.toll, { all: true, hgv: ApiImpl.isTruck(profile) })
const ferryInfo = getInfoFor(path.points, path.details.road_environment, { ferry: true })
const privateOrDeliveryInfo = ApiImpl.isMotorVehicle(profile)
? getInfoFor(path.points, path.details.road_access, {
private: true,
customers: true,
delivery: true,
})
: new RouteInfo()
const badTrackInfo = !ApiImpl.isMotorVehicle(profile)
? new RouteInfo()
: getInfoFor(path.points, path.details.track_type, { grade2: true, grade3: true, grade4: true, grade5: true })
Expand All @@ -93,7 +86,6 @@ function RoutingResult({
fordInfo.distance > 0 ||
tollInfo.distance > 0 ||
ferryInfo.distance > 0 ||
privateOrDeliveryInfo.distance > 0 ||
trunkInfo.distance > 0 ||
badTrackInfo.distance > 0 ||
stepsInfo.distance > 0 ||
Expand Down Expand Up @@ -179,19 +171,6 @@ function RoutingResult({
selected={selectedRH}
segments={ferryInfo.segments}
/>
<RHButton
setDescription={b => setDescriptionRH(b)}
description={tr('way_contains', [tr('private_sections')])}
setType={t => setSelectedRH(t)}
type={'private'}
child={<PrivateIcon />}
value={
privateOrDeliveryInfo.distance > 0 &&
metersToShortText(privateOrDeliveryInfo.distance, showDistanceInMiles)
}
selected={selectedRH}
segments={privateOrDeliveryInfo.segments}
/>
<RHButton
setDescription={b => setDescriptionRH(b)}
description={tr('way_contains_toll')}
Expand Down
5 changes: 2 additions & 3 deletions src/stores/RouteStore.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Store from '@/stores/Store'
import { Action } from '@/stores/Dispatcher'
import { ClearPoints, ClearRoute, RemovePoint, RouteRequestSuccess, SetPoint, SetSelectedPath } from '@/actions/Actions'
import QueryStore, { RequestState } from '@/stores/QueryStore'
import { Path, RoutingArgs, RoutingResult } from '@/api/graphhopper'
import QueryStore from '@/stores/QueryStore'
import { Path, RoutingResult } from '@/api/graphhopper'

export interface RouteStoreState {
routingResult: RoutingResult
Expand Down Expand Up @@ -34,7 +34,6 @@ export default class RouteStore extends Store<RouteStoreState> {
track_type: [],
country: [],
get_off_bike: [],
road_access: [],
},
distance: 0,
points_order: [],
Expand Down
4 changes: 0 additions & 4 deletions test/routing/Api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ describe('route', () => {
details: [
'road_class',
'road_environment',
'road_access',
'surface',
'max_speed',
'average_speed',
Expand Down Expand Up @@ -157,7 +156,6 @@ describe('route', () => {
details: [
'road_class',
'road_environment',
'road_access',
'surface',
'max_speed',
'average_speed',
Expand Down Expand Up @@ -208,7 +206,6 @@ describe('route', () => {
details: [
'road_class',
'road_environment',
'road_access',
'surface',
'max_speed',
'average_speed',
Expand Down Expand Up @@ -315,7 +312,6 @@ describe('route', () => {
details: [
'road_class',
'road_environment',
'road_access',
'surface',
'max_speed',
'average_speed',
Expand Down

0 comments on commit f1406d0

Please sign in to comment.