Hi,
We recently had a need for allowing multiple information layers in a
Django olwidget InfoLayer. An example of this is at
http://aser.gis.mimirtech.com/schools/management/type/ (please
excuse the currently broken CSS). Here, each layer is a type for
the schools displayed on the map, and each school type can be
further classified as government/private. Thus, for each layer (each
school type), we have red pins for government, and blue ones for
private. The idea is to be able to turn off layers, and show that the
provisioning for higher levels of school types is provided by the
private sector, e.g., the top two levels only have blue pins.
We could not find a way to do this within the existing InfoLayer
model,
as each layer needs markers of two types. We came up with a
MultiInfoLayer that is derived from InfoLayer, and allows multiple
info
layers. The code is at
http://pastebin.com/index/K3TFvKTN . This could
be absorbed into InfoLayer in a backwards-compatible manner, as the
prepare() method here examines the first element of the 'info'
argument
to see if it is an iterable.
We would be glad to contribute this. Please let me know if a patch
would be preferred.
Regards,
Gora