Network.OSM
- data TileID
- data TileCoords = TileCoords {}
- downloadBestFitTiles :: String -> (Lat a, Lon a) => [a] -> IO [[ByteString]]
- osmTileURL :: String
- pixelPosForCoord :: (Lon a, Lat a, Integral t) => [a] -> TileCoords -> Int -> (t, t)
- determineTileCoords :: (Lat a, Lon a) => [a] -> Int -> Maybe TileCoords
- selectedTiles :: TileCoords -> [[TileID]]
- downloadTiles :: String -> [[TileID]] -> Int -> IO [[ByteString]]
- copyrightText :: String
Types
data TileCoords Source
The coordinates associated with any particular GPS location
can be computed using determineTileCoords and converted into tile ids
using selectedTiles before final download with downloadTiles.
High Level Operations
downloadBestFitTiles :: String -> (Lat a, Lon a) => [a] -> IO [[ByteString]]Source
Takes the destination directory for the web content, the (Trail PtType), and uses the DrawOsm functions to generate an `osm.png' file showing the trail.
The official OSM tile server.
pixelPosForCoord :: (Lon a, Lat a, Integral t) => [a] -> TileCoords -> Int -> (t, t)Source
Takes a WptType, the OSM tile boundaries, and a zoom level then generates (x,y) points to be placed on the Image.
Low level and helper functions
determineTileCoords :: (Lat a, Lon a) => [a] -> Int -> Maybe TileCoordsSource
Computes the rectangular map region to download based on GPS points and a zoom level
selectedTiles :: TileCoords -> [[TileID]]Source
Takes the boundaries of the OSM tiles, and generates a list of the encompassed OSM tiles.
downloadTiles :: String -> [[TileID]] -> Int -> IO [[ByteString]]Source
Takes the boundaries of the OSM tiles and downloads the tiles, keeping them in proper grid patterns for latter stiching or side-by-side display.
Legal
The suggested copyright text in accordance with http:wiki.openstreetmap.orgwikiLegal_FAQ