@@ -5,8 +5,11 @@ import {
55 type GBFSVersionType ,
66 type GBFSFeedType ,
77} from '../../services/feeds/utils' ;
8- import { type LatLngTuple } from 'leaflet' ;
9- import { type GeoJSONData , type GeoJSONDataGBFS } from '../../types' ;
8+ import {
9+ type LngLatTuple ,
10+ type GeoJSONData ,
11+ type GeoJSONDataGBFS ,
12+ } from '../../types' ;
1013
1114export function formatProvidersSorted ( provider : string ) : string [ ] {
1215 const providers = provider . split ( ',' ) . filter ( ( n ) => n ) ;
@@ -136,7 +139,7 @@ export const sortGbfsVersions = (
136139/* eslint-disable */
137140export function computeBoundingBox (
138141 geojson : GeoJSONData | GeoJSONDataGBFS ,
139- ) : LatLngTuple [ ] | undefined {
142+ ) : LngLatTuple [ ] | undefined {
140143 if ( geojson == null ) {
141144 return undefined ;
142145 }
@@ -187,14 +190,14 @@ export function computeBoundingBox(
187190 }
188191
189192 return [
190- [ minY , minX ] ,
191- [ maxY , maxX ] ,
193+ [ minX , minY ] ,
194+ [ maxX , maxY ] ,
192195 ] ;
193196}
194197
195198export const getBoundingBox = (
196199 feed : GTFSFeedType | GBFSFeedType ,
197- ) : LatLngTuple [ ] | undefined => {
200+ ) : LngLatTuple [ ] | undefined => {
198201 if ( feed == undefined || feed . data_type === 'gtfs_rt' ) {
199202 return undefined ;
200203 } ;
@@ -208,20 +211,20 @@ export const getBoundingBox = (
208211 }
209212 return [
210213 [
211- feed . bounding_box . minimum_latitude ,
212214 feed . bounding_box . minimum_longitude ,
215+ feed . bounding_box . minimum_latitude ,
213216 ] ,
214217 [
215- feed . bounding_box . minimum_latitude ,
216218 feed . bounding_box . maximum_longitude ,
219+ feed . bounding_box . minimum_latitude ,
217220 ] ,
218221 [
219- feed . bounding_box . maximum_latitude ,
220222 feed . bounding_box . maximum_longitude ,
223+ feed . bounding_box . maximum_latitude ,
221224 ] ,
222225 [
223- feed . bounding_box . maximum_latitude ,
224226 feed . bounding_box . minimum_longitude ,
227+ feed . bounding_box . maximum_latitude ,
225228 ] ,
226229 ] ;
227230} ;
0 commit comments