highlight selection on map
This commit is contained in:
parent
c294add7e2
commit
0b1aa29f41
@ -461,6 +461,17 @@ trackView leftedge topedge zoom selection points =
|
|||||||
in (String.fromInt x_) ++ ", " ++
|
in (String.fromInt x_) ++ ", " ++
|
||||||
(String.fromInt y_) ++ ", "
|
(String.fromInt y_) ++ ", "
|
||||||
line = String.concat (List.map plot points)
|
line = String.concat (List.map plot points)
|
||||||
|
selectedPoints =
|
||||||
|
Maybe.map
|
||||||
|
(\(s, e) ->
|
||||||
|
List.filter (\p -> p.time >= s && p.time <= e) points)
|
||||||
|
selection
|
||||||
|
selectionLine =
|
||||||
|
case selectedPoints of
|
||||||
|
Just spoints ->
|
||||||
|
polyline [ S.points (String.concat (List.map plot spoints)) ] []
|
||||||
|
Nothing -> g [] []
|
||||||
|
|
||||||
in
|
in
|
||||||
svg
|
svg
|
||||||
[ H.style "width" "100%"
|
[ H.style "width" "100%"
|
||||||
@ -470,13 +481,15 @@ trackView leftedge topedge zoom selection points =
|
|||||||
[ g
|
[ g
|
||||||
[ fill "none"
|
[ fill "none"
|
||||||
, stroke "blue"
|
, stroke "blue"
|
||||||
, strokeWidth "7"
|
, strokeWidth "5"
|
||||||
, strokeOpacity "0.5"]
|
, strokeOpacity "0.5"]
|
||||||
[
|
[
|
||||||
polyline
|
polyline
|
||||||
[ fill "none"
|
[ fill "none"
|
||||||
, S.points line
|
, S.points line
|
||||||
] []
|
] []
|
||||||
|
, g [ stroke "red", strokeWidth "7", strokeOpacity "0.9" ]
|
||||||
|
[ selectionLine ]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user