''

def __init__(self, layer, mapfile, fields, layer_index=0, wrapper=None, scale=4, buffer=0):

    self.mapnik = None
    self.layer = layer
    maphref = urljoin(layer.config.dirpath, mapfile)
    (scheme, h, path, q, p, f) = urlparse(maphref)
    if (scheme in ('file', '')):
        self.mapfile = path
    else:
        self.mapfile = maphref
    self.layer_index = layer_index
    self.wrapper = wrapper
    self.scale = scale
    self.buffer = buffer
    self.fields = list((str(x) for x in fields))
    self.mercator = getProjectionByName('spherical    mercator')
