Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

When determining elevations, use fromMaybe with a sensible default (v…

…s fromJust)
  • Loading branch information...
commit 4d1a9b94b3afea6f3dc92731e399f5f2bfbd628f 1 parent b26bf44
@TomMD TomMD authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 Data/GPS/Gps2HtmlReport/DrawOsm.hs
View
4 Data/GPS/Gps2HtmlReport/DrawOsm.hs
@@ -125,8 +125,8 @@ drawLines [_] _ img = return img
drawLines (wpt:wpts) tCoord img = do
let start = pixelPosForCoord [wpt] tCoord
end = pixelPosForCoord [head wpts] tCoord
- minEle = snd $ fromJust $ findPoint wpts wpt ele (<)
- maxEle = snd $ fromJust $ findPoint wpts wpt ele (>)
+ minEle = fromMaybe 0 $ fmap snd $ findPoint wpts wpt ele (<)
+ maxEle = fromMaybe 0 $ fmap snd $ findPoint wpts wpt ele (>)
drawLine' start end img (minEle,fromJust $ ele wpt,maxEle) 0
drawLines wpts tCoord img
Please sign in to comment.
Something went wrong with that request. Please try again.