Created
December 24, 2017 10:53
-
-
Save apeyroux/7de40a40770b544ce2727e307cb1e61e to your computer and use it in GitHub Desktop.
HSlippyMap Exemple
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import HSlippyMap | |
{-- | |
let max = tileFromLatLong 48.9031 2.5214 10 | |
let min = tileFromLatLong 48.8146 2.1732 10 | |
mapM (\(x,y) -> mapM (\y'-> print $ "http://tile.openstreetmap.org/" ++ show z ++ "/" \ | |
++ show x ++ "/" ++ show y' ++ ".png") y) [(x,[(minimum [tymin, tymax])..(maximum [tymin\ | |
,tymax])]) | x <- [(minimum [txmin, txmax])..(maximum [txmin, txmax])]] | |
--} | |
main = do | |
--mapM (print . show . tileFromLatLong lat long) [0..18] | |
mapM (\(x,y) -> mapM (\y'-> | |
print $ "http://tile.openstreetmap.org/" ++ show z ++ "/" ++ show x ++ "/" ++ show y' ++ ".png") y) | |
[(x,[(minimum [tymin, tymax])..(maximum [tymin,tymax])]) | x <- [(minimum [txmin, txmax])..(maximum [txmin, txmax])]] | |
where | |
min = tileFromLatLong 49.13 3.05 8 | |
max = tileFromLatLong (-48.57) 1.66 8 | |
txmin = tx min | |
txmax = tx max | |
tymax = ty min | |
tymin = ty max | |
z = tz min |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment