Esempio n. 1
0
    def __init__(self, style, tile_format="png"):
        # the spherical mercator world tile covers (-π, -π) to (π, π)
        t = deriveTransformation(-pi, pi, 0, 0, pi, pi, 1, 0, -pi, -pi, 0, 1)
        self.projection = MercatorProjection(0, t)

        self.style = style
        self.tile_format = tile_format
Esempio n. 2
0
    def __init__(self, style, tile_format='png'):
        # the spherical mercator world tile covers (-π, -π) to (π, π)
        t = deriveTransformation(-pi, pi, 0, 0, pi, pi, 1, 0, -pi, -pi, 0, 1)
        self.projection = MercatorProjection(0, t)

        self.style = style
        self.tile_format = tile_format
Esempio n. 3
0
 def __init__(self, apikey, style=None):
     # the spherical mercator world tile covers (-π, -π) to (π, π)
     t = deriveTransformation(-pi, pi, 0, 0, pi, pi, 1, 0, -pi, -pi, 0, 1)
     self.projection = MercatorProjection(0, t)
     
     self.key = apikey
     
     if style:
         self.style = style
Esempio n. 4
0
 def __init__(self, template):
     # the spherical mercator world tile covers (-π, -π) to (π, π)
     t = deriveTransformation(-pi, pi, 0, 0, pi, pi, 1, 0, -pi, -pi, 0, 1)
     self.projection = MercatorProjection(0, t)
     
     self.templates = []
     
     while template:
         match = re.match(r'^(http://\S+?)(,http://\S+)?$', template)
         first = match.group(1)
         
         if match:
             self.templates.append(first)
             template = template[len(first):].lstrip(',')
         else:
             break
Esempio n. 5
0
 def __init__(self, template, scheme="xyz"):
     # the spherical mercator world tile covers (-π, -π) to (π, π)
     t = deriveTransformation(-pi, pi, 0, 0, pi, pi, 1, 0, -pi, -pi, 0, 1)
     self.projection = MercatorProjection(0, t)
     self.scheme = scheme
     self.templates = []
     
     while template:
         match = re.match(r'^(http://\S+?)(,http://\S+)?$', template)
         first = match.group(1)
         
         if match:
             # normalize {x}{y}{z} to {X}{Y}{Z}
             first = re.sub("{[xyz]}", lambda mo: mo.group(0).upper(), first)
             self.templates.append(first)
             template = template[len(first):].lstrip(',')
         else:
             break
Esempio n. 6
0
 def __init__(self):
     # the spherical mercator world tile covers (-π, -π) to (π, π)
     t = deriveTransformation(-pi, pi, 0, 0, pi, pi, 1, 0, -pi, -pi, 0, 1)
     self.projection = MercatorProjection(0, t)
Esempio n. 7
0
 def __init__(self):
     # the spherical mercator world tile covers (-π, -π) to (π, π)
     t = deriveTransformation(-pi, pi, 0, 0, pi, pi, 1, 0, -pi, -pi, 0, 1)
     self.projection = MercatorProjection(0, t)