File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import useThemeStyles from '@hooks/useThemeStyles';
33import CONST from '@src/CONST' ;
44import type { DirectionProps } from './MapViewTypes' ;
55
6- function Direction ( { coordinates} : DirectionProps ) {
6+ function Direction ( { coordinates, belowLayerID } : DirectionProps ) {
77 const styles = useThemeStyles ( ) ;
88 if ( coordinates . length < 1 ) {
99 return null ;
@@ -22,7 +22,7 @@ function Direction({coordinates}: DirectionProps) {
2222 } }
2323 >
2424 < Mapbox . LineLayer
25- belowLayerID = { CONST . MAP_VIEW_LAYERS . USER_LOCATION }
25+ belowLayerID = { belowLayerID }
2626 id = { CONST . MAP_VIEW_LAYERS . ROUTE_FILL }
2727 style = { styles . mapDirection }
2828 />
Original file line number Diff line number Diff line change @@ -319,7 +319,12 @@ function MapView({
319319 ) ;
320320 } ) }
321321
322- { ! ! directionCoordinates && < Direction coordinates = { directionCoordinates } /> }
322+ { ! ! directionCoordinates && (
323+ < Direction
324+ coordinates = { directionCoordinates }
325+ belowLayerID = { interactive ? CONST . MAP_VIEW_LAYERS . USER_LOCATION : undefined }
326+ />
327+ ) }
323328 { ! ! distanceSymbolCoordinate && ! ! distanceInMeters && ! ! distanceUnit && (
324329 < MarkerView
325330 coordinate = { distanceSymbolCoordinate }
Original file line number Diff line number Diff line change @@ -39,6 +39,9 @@ type MapViewProps = {
3939type DirectionProps = {
4040 // Coordinates of points that constitute the direction
4141 coordinates : Coordinate [ ] ;
42+
43+ // ID of the layer to place the line layer below
44+ belowLayerID ?: string ;
4245} ;
4346
4447type PendingMapViewProps = {
You can’t perform that action at this time.
0 commit comments