def __init__(self, demdir, tiledir, tmpdir, source): """ """ cache = Disk(tiledir, dirs='safe') config = Configuration(cache, '.') Layer.__init__(self, config, SphericalMercator(), Metatile()) self.provider = Provider(self, demdir, tmpdir, source)
def clone_layer(layer, provider_names): from TileStache.Core import Layer copy = Layer( layer.config, layer.projection, layer.metatile, layer.stale_lock_timeout, layer.cache_lifespan, layer.write_cache, layer.allowed_origin, layer.max_cache_age, layer.redirects, layer.preview_lat, layer.preview_lon, layer.preview_zoom, layer.preview_ext, layer.bounds, layer.dim, ) copy.provider = layer.provider copy.provider(copy, provider_names) return copy