Skip to content

Commit 249ffd4

Browse files
committed
fix: handles edge case where 2 directions share the same stop
1 parent 8611039 commit 249ffd4

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

app/components/map/MapView.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1+
import { Ionicons, MaterialCommunityIcons } from '@expo/vector-icons';
2+
import MaterialIcons from '@expo/vector-icons/MaterialIcons';
3+
import { decode } from '@googlemaps/polyline-codec';
4+
import { DarkGoogleMaps } from 'app/theme';
5+
import * as Location from 'expo-location';
16
import React, { useEffect, useRef, useState } from 'react';
27
import { Dimensions, Platform, TouchableOpacity, View } from 'react-native';
38
import MapView, { LatLng, Polyline, Region } from 'react-native-maps';
4-
import * as Location from 'expo-location';
5-
import MaterialIcons from '@expo/vector-icons/MaterialIcons';
69
import {
710
IMapRoute,
811
RoutePlanMapMarker,
912
RoutePlanPolylinePoint,
1013
} from '../../../utils/interfaces';
14+
import { useVehicles } from '../../data/api_query';
1115
import useAppStore from '../../data/app_state';
1216
import BusMarker from './markers/BusMarker';
13-
import StopMarker from './markers/StopMarker';
14-
import { useVehicles } from '../../data/api_query';
15-
import { Ionicons, MaterialCommunityIcons } from '@expo/vector-icons';
16-
import { decode } from '@googlemaps/polyline-codec';
1717
import RoutePlanMarker from './markers/RoutePlanMarker';
18-
import { DarkGoogleMaps } from 'app/theme';
18+
import StopMarker from './markers/StopMarker';
1919

2020
const Map: React.FC = () => {
2121
const mapViewRef = useRef<MapView>(null);
@@ -411,7 +411,8 @@ const Map: React.FC = () => {
411411
route={selectedRoute}
412412
direction={patternPath.directionKey}
413413
isCalloutShown={
414-
poppedUpStopCallout?.stopCode === stop.stopCode
414+
poppedUpStopCallout?.stopCode === stop.stopCode &&
415+
selectedRouteDirection === patternPath.directionKey
415416
}
416417
/>
417418
);

0 commit comments

Comments
 (0)