Exemplo 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
Exemplo 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
Exemplo 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
Exemplo 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
Exemplo 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
Exemplo 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)
Exemplo 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)