<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi,<br>
<br>
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.
<br>
<br>
In the following case the styles parameter is ignored. The return getMap is in default style instead of Erfgoedetalage_AMK.<br>
<br>
sources:<br>
  ...<br>
  rce_wms_featureinfo:<br>
    ....<br>
    req:<br>
      url: http://services.rce.geovoorziening.nl/ows?<br>
      layers: rce:ArcheologicalMonuments<br>
      styles: Erfgoedetalage_AMK<br>
<br>
<br>
When adding the styles parameter to the url like shown below, the write style is used.
<br>
<br>
sources:<br>
  ...<br>
  rce_wms_featureinfo:<br>
    ....<br>
    req:<br>
      url: http://services.rce.geovoorziening.nl/ows?styles=Erfgoedetalage_AMK<br>
     <br>
The only problem with this, is that the style parameter ('styles=') must always be added to the proxy url request<br>
    <br>
   def validate_styles(self):<br>
        if 'styles' in self.params:<br>
            styles = self.params['styles']<br>
            if not set(styles.split(',')).issubset(set(['default', ''])):<br>
                raise RequestError('unsupported styles: ' + self.params['styles'],<br>
                                   code='StyleNotDefined', request=self)<br>
<br>
The result will be that the actual request will have two style parameters (styles=Erfgoedetalage_AMK, styles=)<br>
<br>
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<br>
<br>
<div>Isn't there an other way to configure the custom style of a wms in the mapproxy.yaml file?<br>
<br>
Thanks,<br>
Kind regards,<br>
<br>
Tinne Cahy<br>
<br>
<div style="font-family:Tahoma; font-size:13px">
<div id="divBdy" class="bdyItmPrt">
<div>
<div><span lang="en-US">
<div><br>
<div style="margin:0"><font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><font color="#1F497D"><b><br>
Tinne Cahy</b></font></span></font></div>
<div style="margin:0"><font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><font color="#1F497D">Geo-ICT Consultant</font></span></font></div>
<div style="margin:0"><font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><font color="#1F497D"> </font></span></font></div>
<div style="margin:0"><font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><font color="#1F497D">GEO Solutions</font></span></font></div>
<div style="margin:0"><font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><font color="#1F497D"><span lang="nl-BE">Veldkant 33B – 2550 Kontich</span></font></span></font></div>
<div style="margin:0"><font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><a href="http://www.geosolutions.be" target="_blank"><span lang="nl-BE">www.geosolutions.be</span></a></span></font></div>
</div>
</span></div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>