frontend: show event points with correct zIndex, too (fixes #99)
This commit is contained in:
parent
305850ea63
commit
7bba46fa52
|
@ -85,11 +85,12 @@ function pointStyleFunction(feature, resolution) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function PointLayer({features, title, visible}) {
|
function PointLayer({features, title, visible, zIndex}) {
|
||||||
return <Map.VectorLayer {...{title, visible}} style={pointStyleFunction} source={new VectorSource({features})} />
|
return (
|
||||||
|
<Map.VectorLayer {...{title, visible, zIndex}} style={pointStyleFunction} source={new VectorSource({features})} />
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const trackStroke = new Stroke({width: 4, color: 'rgb(30,144,255)'})
|
const trackStroke = new Stroke({width: 4, color: 'rgb(30,144,255)'})
|
||||||
const trackLayerStyle = new Style({stroke: trackStroke})
|
const trackLayerStyle = new Style({stroke: trackStroke})
|
||||||
|
|
||||||
|
@ -201,8 +202,7 @@ export default function TrackMap({trackData, show, ...props}: {trackData: TrackD
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Map {...props}>
|
<Map {...props}>
|
||||||
<Map.BaseLayer
|
<Map.BaseLayer zIndex={10} />
|
||||||
zIndex={10} />
|
|
||||||
<Map.VectorLayer
|
<Map.VectorLayer
|
||||||
visible
|
visible
|
||||||
updateWhileAnimating={false}
|
updateWhileAnimating={false}
|
||||||
|
@ -218,8 +218,18 @@ export default function TrackMap({trackData, show, ...props}: {trackData: TrackD
|
||||||
</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} zIndex={101} />
|
<PointLayer
|
||||||
<PointLayer features={trackPointsUntaggedD2} title="Right Untagged" visible={show.rightUnconfirmed} zIndex={101} />
|
features={trackPointsUntaggedD1}
|
||||||
|
title="Left Untagged"
|
||||||
|
visible={show.leftUnconfirmed}
|
||||||
|
zIndex={101}
|
||||||
|
/>
|
||||||
|
<PointLayer
|
||||||
|
features={trackPointsUntaggedD2}
|
||||||
|
title="Right Untagged"
|
||||||
|
visible={show.rightUnconfirmed}
|
||||||
|
zIndex={101}
|
||||||
|
/>
|
||||||
</Map.GroupLayer>
|
</Map.GroupLayer>
|
||||||
|
|
||||||
<Map.View />
|
<Map.View />
|
||||||
|
|
Loading…
Reference in a new issue