Distinct Functionality • Caches: Instructions for storing tiles generated via a Provider class instance. • Providers: Instructions for rendering a tile in a specifc format (raster/vector) from a specific data source (postgis/shp). • Configuration File: Links providers with caches.
Extending “It should be quick and easy to understand what the library is doing and why... Where possible, dynamic programming “magic” is to be avoided, in favor of basic, procedural and copiously-documented Python.” - Project Docs
Extending class ProviderStub: def __init__(self, layer): # create a new provider for a layer raise NotImplementedError def renderTile(self, width, height, srs, coord): # return an object with a PIL-like save() method for a tile raise NotImplementedError def renderArea(self, width, height, srs, xmin, ymin, xmax, ymax, zoom): # return an object with a PIL-like save() method for an area raise NotImplementedError