@@ -17,7 +17,6 @@ import {
1717import { LineString } from 'geojson'
1818import { getTranslation , tr } from '@/translation/Translation'
1919import * as config from 'config'
20- import { Coordinate } from '@/stores/QueryStore'
2120import { POIQuery } from '@/pois/AddressParseResult'
2221
2322interface ApiProfile {
@@ -445,7 +444,7 @@ export class ApiImpl implements Api {
445444
446445 public static isMotorVehicle ( profile : string ) {
447446 return (
448- profile . includes ( 'car' ) && ! profile . includes ( 'cargobike' ) ||
447+ ( profile . includes ( 'car' ) && ! profile . includes ( 'cargobike' ) ) ||
449448 profile . includes ( 'truck' ) ||
450449 profile . includes ( 'scooter' ) ||
451450 profile . includes ( 'bus' ) ||
@@ -456,25 +455,4 @@ export class ApiImpl implements Api {
456455 public static isTruck ( profile : string ) {
457456 return profile . includes ( 'truck' )
458457 }
459-
460- public static getBBoxPoints ( points : Coordinate [ ] ) : Bbox | null {
461- const bbox : Bbox = points . reduce (
462- ( res : Bbox , c ) => [
463- Math . min ( res [ 0 ] , c . lng ) ,
464- Math . min ( res [ 1 ] , c . lat ) ,
465- Math . max ( res [ 2 ] , c . lng ) ,
466- Math . max ( res [ 3 ] , c . lat ) ,
467- ] ,
468- [ 180 , 90 , - 180 , - 90 ] as Bbox
469- )
470- if ( points . length == 1 ) {
471- bbox [ 0 ] = bbox [ 0 ] - 0.001
472- bbox [ 1 ] = bbox [ 1 ] - 0.001
473- bbox [ 2 ] = bbox [ 2 ] + 0.001
474- bbox [ 3 ] = bbox [ 3 ] + 0.001
475- }
476-
477- // return null if the bbox is not valid, e.g. if no url points were given at all
478- return bbox [ 0 ] < bbox [ 2 ] && bbox [ 1 ] < bbox [ 3 ] ? bbox : null
479- }
480458}
0 commit comments