frontend: fix z-order of layers on track page

This commit is contained in:
Paul Bienkowski 2021-09-27 20:50:56 +02:00
parent 67c6b3a725
commit 305850ea63

View file

@ -201,23 +201,25 @@ export default function TrackMap({trackData, show, ...props}: {trackData: TrackD
return ( return (
<Map {...props}> <Map {...props}>
<Map.BaseLayer /> <Map.BaseLayer
zIndex={10} />
<Map.VectorLayer <Map.VectorLayer
visible visible
updateWhileAnimating={false} updateWhileAnimating={false}
updateWhileInteracting={false} updateWhileInteracting={false}
source={trackVectorSource} source={trackVectorSource}
style={trackLayerStyleWithArrows} style={trackLayerStyleWithArrows}
zIndex={100}
/> />
<Map.GroupLayer title="Tagged Points" visible> <Map.GroupLayer title="Tagged Points" visible>
<PointLayer features={trackPointsD1} title="Left" visible={show.left} /> <PointLayer features={trackPointsD1} title="Left" visible={show.left} zIndex={101} />
<PointLayer features={trackPointsD2} title="Right" visible={show.right} /> <PointLayer features={trackPointsD2} title="Right" visible={show.right} zIndex={101} />
</Map.GroupLayer> </Map.GroupLayer>
<Map.GroupLayer title="Untagged Points" fold="close" visible> <Map.GroupLayer title="Untagged Points" fold="close" visible>
<PointLayer features={trackPointsUntaggedD1} title="Left Untagged" visible={show.leftUnconfirmed} /> <PointLayer features={trackPointsUntaggedD1} title="Left Untagged" visible={show.leftUnconfirmed} zIndex={101} />
<PointLayer features={trackPointsUntaggedD2} title="Right Untagged" visible={show.rightUnconfirmed} /> <PointLayer features={trackPointsUntaggedD2} title="Right Untagged" visible={show.rightUnconfirmed} zIndex={101} />
</Map.GroupLayer> </Map.GroupLayer>
<Map.View /> <Map.View />