@@ -30,11 +30,11 @@ class MapSource(object):
3030 "thunderforest-transport" : (0 , 0 , 19 , "http://{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png" , attribution_thunderforest ),
3131 "thunderforest-landscape" : (0 , 0 , 19 , "http://{s}.tile.thunderforest.com/landscape/{z}/{x}/{y}.png" , attribution_thunderforest ),
3232 "thunderforest-outdoors" : (0 , 0 , 19 , "http://{s}.tile.thunderforest.com/outdoors/{z}/{x}/{y}.png" , attribution_thunderforest ),
33-
33+
3434 # no longer available
3535 #"mapquest-osm": (0, 0, 19, "http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpeg", "Tiles Courtesy of Mapquest", {"subdomains": "1234", "image_ext": "jpeg"}),
3636 #"mapquest-aerial": (0, 0, 19, "http://oatile{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpeg", "Tiles Courtesy of Mapquest", {"subdomains": "1234", "image_ext": "jpeg"}),
37-
37+
3838 # more to add with
3939 # https://github.com/leaflet-extras/leaflet-providers/blob/master/leaflet-providers.js
4040 # not working ?
@@ -43,11 +43,11 @@ class MapSource(object):
4343 }
4444
4545 def __init__ (self ,
46- url = "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" ,
47- cache_key = None , min_zoom = 0 , max_zoom = 19 , tile_size = 256 ,
48- image_ext = "png" ,
49- attribution = "© OpenStreetMap contributors" ,
50- subdomains = "abc" , ** kwargs ):
46+ url = "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" ,
47+ cache_key = None , min_zoom = 0 , max_zoom = 19 , tile_size = 256 ,
48+ image_ext = "png" ,
49+ attribution = "© OpenStreetMap contributors" ,
50+ subdomains = "abc" , ** kwargs ):
5151 super (MapSource , self ).__init__ ()
5252 if cache_key is None :
5353 # possible cache hit, but very unlikely
@@ -91,7 +91,7 @@ def get_y(self, zoom, lat):
9191 """
9292 lat = clamp (- lat , MIN_LATITUDE , MAX_LATITUDE )
9393 lat = lat * pi / 180.
94- return ((1.0 - log (tan (lat ) + 1.0 / cos (lat )) / pi ) / \
94+ return ((1.0 - log (tan (lat ) + 1.0 / cos (lat )) / pi ) /
9595 2. * pow (2. , zoom )) * self .dp_tile_size
9696
9797 def get_lon (self , zoom , x ):
0 commit comments