1
我是python的新手,所以請原諒我這個新手問題。我有一個類和函數:如何將變量傳遞給mapnik數據源類?
class Datasource(mapnik.PythonDatasource):
def __init__(self):
super(Datasource, self).__init__()
def features(self, query):
return mapnik.PythonDatasource.wkb_features(mvt)
def tileLayer(request, version, shapefile_id, zoom, x, y):
mvt = requestHandler(request, zoom, x, y)
datasource = mapnik.Python(factory='Datasource')
我怎麼能叫mapnik.Python(factory='Datasource')