Clone wiki

zgeo.recipe.openlayers / Home

A zc.buildout recipe for profiles of OpenLayers

See also:

OpenLayers is fantastic. And big. Your application probably doesn't need all of it. It includes tools to build smaller profiles; all you need is dependable machinery for configuring and applying the tools in a replicable way. Using zgeo.recipe.openlayers with zc.buildout provides you with such machinery. A terse, descriptive, configuration like this:

parts = openlayers-2.7-wms

recipe = zgeo.recipe.openlayers
url =
filename = OpenLayers-2.7-WMS.js
include =

Yields a small, WMS-only, profile in a file named OpenLayers-2.7-WMS.js in the directory parts/openlayers-2.7-wms. You can add as many parts as you like and build a herd of profiles for different applications from one configuration file.

Getting started

Probably better to do all of this in a virtualenv, which I'll assume you know. Download and buildout.cfg from into your clean working directory or virtualenv. Then:

$ python

to fetch zc.buildout and its dependencies. When complete, just execute:

$ bin/buildout -c buildout.cfg

to build your profile(s).