Instead of concentrating on OpenStreetMap we rebuild the class
to do addresses with coordinates and the occational picture if needed.
h = Http(".cache")
-class StaticOpenStreetMap(object):
- """Setting up a static image from OSM with one or more markers"""
- def __init__(self):
- self._zoom = 0
- self._width = 0
- self._height = 0
- self._markers = []
- self._maptype = 'mapnik'
-
- def add_marker(lon,lat):
- self._markers.append((lon,lat))
-
-# def construct_map(self):
-# for coord in self._markers:
-# print coord
-
def lontile(lon, zoom):
tile = ((lon + 180) / 360) * (2**zoom)
return tile