[MapProxy] Style configuration of a wms

Cahy Tinne Tinne.Cahy at geosolutions.be
Tue Sep 23 07:04:24 PDT 2014


The representation of the wms I am using changes completely  when using different style parameters in the getMap request (even the number of features changes). I am trying to configure the mapproxy.yaml file so the custom style parameter is used.

In the following case the styles parameter is ignored. The return getMap is in default style instead of Erfgoedetalage_AMK.

      url: http://services.rce.geovoorziening.nl/ows?
      layers: rce:ArcheologicalMonuments
      styles: Erfgoedetalage_AMK

When adding the styles parameter to the url like shown below, the write style is used.

      url: http://services.rce.geovoorziening.nl/ows?styles=Erfgoedetalage_AMK

The only problem with this, is that the style parameter ('styles=') must always be added to the proxy url request

   def validate_styles(self):
        if 'styles' in self.params:
            styles = self.params['styles']
            if not set(styles.split(',')).issubset(set(['default', ''])):
                raise RequestError('unsupported styles: ' + self.params['styles'],
                                   code='StyleNotDefined', request=self)

The result will be that the actual request will have two style parameters (styles=Erfgoedetalage_AMK, styles=)

http://services.rce.geovoorziening.nl/ows?styles=Erfgoedetalage_AMK&layers=rce%3AArcheologicalMonuments&styles=&service=WMS&format=image%2Fpng&feature_count=20&request=GetMap&height=447&srs=EPSG%3A900913&version=1.1.1&bbox=438312.048646,6703827.55836,499003.049096,6720911.23418&width=1588 200 - 222

Isn't there an other way to configure the custom style of a wms in the mapproxy.yaml file?

Kind regards,

Tinne Cahy

Tinne Cahy
Geo-ICT Consultant

GEO Solutions
Veldkant 33B – 2550 Kontich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20140923/2afcbfd9/attachment.html>

More information about the MapProxy mailing list