|
| 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'; |
1 | 6 | import React, { useEffect, useRef, useState } from 'react'; |
2 | 7 | import { Dimensions, Platform, TouchableOpacity, View } from 'react-native'; |
3 | 8 | import MapView, { LatLng, Polyline, Region } from 'react-native-maps'; |
4 | | -import * as Location from 'expo-location'; |
5 | | -import MaterialIcons from '@expo/vector-icons/MaterialIcons'; |
6 | 9 | import { |
7 | 10 | IMapRoute, |
8 | 11 | RoutePlanMapMarker, |
9 | 12 | RoutePlanPolylinePoint, |
10 | 13 | } from '../../../utils/interfaces'; |
| 14 | +import { useVehicles } from '../../data/api_query'; |
11 | 15 | import useAppStore from '../../data/app_state'; |
12 | 16 | 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'; |
17 | 17 | import RoutePlanMarker from './markers/RoutePlanMarker'; |
18 | | -import { DarkGoogleMaps } from 'app/theme'; |
| 18 | +import StopMarker from './markers/StopMarker'; |
19 | 19 |
|
20 | 20 | const Map: React.FC = () => { |
21 | 21 | const mapViewRef = useRef<MapView>(null); |
@@ -411,7 +411,8 @@ const Map: React.FC = () => { |
411 | 411 | route={selectedRoute} |
412 | 412 | direction={patternPath.directionKey} |
413 | 413 | isCalloutShown={ |
414 | | - poppedUpStopCallout?.stopCode === stop.stopCode |
| 414 | + poppedUpStopCallout?.stopCode === stop.stopCode && |
| 415 | + selectedRouteDirection === patternPath.directionKey |
415 | 416 | } |
416 | 417 | /> |
417 | 418 | ); |
|
0 commit comments