- data TileCoords = TileCoords {}
- tileNumbers :: Double -> Double -> Int -> [(Int, Int)]
- maxTile :: [(Int, Int)] -> (Int, Int)
- secant :: Floating a => a -> a
- initCoords :: TileCoords
- determineTiles :: [WptType] -> TileCoords -> Int -> TileCoords
- deltaLat :: TileCoords -> Int
- deltaLong :: TileCoords -> Int
- zoom :: TileCoords -> Int
- zoomCalc :: TileCoords -> Int
- selectedTiles :: TileCoords -> [(Int, Int)]
- filenameStr :: (Show a, Show a1) => a -> a1 -> String
- rectangle :: Int -> Int -> Rectangle
- downloadFile :: String -> IO Image
- makeOSMLayer :: TileCoords -> Int -> IO Image
- placeTile :: Int -> Int -> Image -> TileCoords -> Int -> IO ()
- projectMercToLat :: Floating a => a -> a
- project :: Int -> Int -> Int -> (Double, Double, Double, Double)
- pixelPosForCoord :: (Lon a, Lat a, Integral t, Integral t1) => [a] -> TileCoords -> Int -> (t, t1)
- drawLines :: [WptType] -> TileCoords -> Image -> Int -> IO Image
- drawLine' :: Point -> Point -> Image -> (Double, Double, Double) -> Int -> IO ()
- lineColor :: Int -> Color
- addCopyright :: Image -> IO (Point, Point, Point, Point)
- fitToWidth :: Image -> IO Image
- resizeImg :: Image -> (Int, Int) -> IO Image
- generateOsmMap :: String -> [WptType] -> IO ()
Documentation
determineTiles :: [WptType] -> TileCoords -> Int -> TileCoordsSource
Determines the minimum and maximum of the X and Y tiles to be downloaded from OSM
deltaLat :: TileCoords -> IntSource
deltaLong :: TileCoords -> IntSource
zoom :: TileCoords -> IntSource
zoomCalc :: TileCoords -> IntSource
selectedTiles :: TileCoords -> [(Int, Int)]Source
Takes the boundaries of the OSM tiles, and generates [(Int,Int)] containing a list of all OSM tiles that need downloading
filenameStr :: (Show a, Show a1) => a -> a1 -> StringSource
Formats the filename string
downloadFile :: String -> IO ImageSource
Takes the URL of a given OSM tile and uses curl to download it
makeOSMLayer :: TileCoords -> Int -> IO ImageSource
projectMercToLat :: Floating a => a -> aSource
project :: Int -> Int -> Int -> (Double, Double, Double, Double)Source
Used by pixelPosForCoord
for N,S,E,W coordinates for (x,y) values
pixelPosForCoord :: (Lon a, Lat a, Integral t, Integral t1) => [a] -> TileCoords -> Int -> (t, t1)Source
Takes a WptType, and the OSM tile boundaries
and generates (x,y) points to be placed on the Image
lineColor :: Int -> ColorSource
Uses a sliding scale for the red value in the RGB Color to show a sliding color from green to yellow in accordance with the relative elevation of a given WptType in the Trail
addCopyright :: Image -> IO (Point, Point, Point, Point)Source
Adds the copyright text in accordance with http:wiki.openstreetmap.orgwikiLegal_FAQ
fitToWidth :: Image -> IO ImageSource
If the generated OSM image has a greater width than 800 pixels, it is scaled to have a width of 800 pixels.