Hi,

I'm trying to run a Mapnik XML file with Openlayers. To do so I have a python 
class named XML_Factory.py (see code below). Without Openlayers I'm able to 
make a request with just one single layer, but when I specify another layer 
with an other style I get the following exception:

"OGCException: STYLES length does not match LAYERS length."

I solved this problem by specifying more than one styles to the STYLES 
parameter. But how am I able to do so in Openlayers?

This is how I request Mapnik via Openlayers:

var mapnikwms = new 
OpenLayers.Layer.WMS("MapnikWMS","http://gaia.geo.at/cgi-bin/mapnikwms.py?",{layers:['staat01','land_grenzen01'],
 format:'image/png'});

Thanks for any help.

Martin


XML_Factory.py:

--------------------------------------------------

from mapnik.ogcserver.WMS import BaseWMSFactory

class WMSFactory(BaseWMSFactory):
  def __init__(self):
    BaseWMSFactory.__init__(self)

    self.loadXML('world_styles2.xml')
    self.finalize()

-- 
Aufgepasst: Sind Ihre Daten beim Online-Banking auch optimal geschützt?
Jetzt absichern: https://homebanking.gmx.net/[email protected]
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to