Skip to content

Commit

Permalink
Merge pull request #5044 from pblottiere/server_bugfix_ogc_getcapa_st…
Browse files Browse the repository at this point in the history
…yles

[server][bugfix] Fixes OGC test on legendurl styles
  • Loading branch information
rldhont committed Aug 24, 2017
2 parents 835e6d2 + 465b27a commit 0dbf432
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/server/services/wms/qgswmsparameters.cpp
Expand Up @@ -362,7 +362,7 @@ namespace QgsWms
QVariant( "" ),
QVariant()
};
save( pLayers );
save( pStyle );

const Parameter pStyles = { ParameterName::STYLES,
QVariant::String,
Expand Down
20 changes: 19 additions & 1 deletion tests/src/python/test_qgsserver_wms.py
Expand Up @@ -702,7 +702,7 @@ def test_wms_getmap_style(self):
r, h = self._result(self._execute_request(qs))
self._img_diff_error(r, h, "WMS_GetMap_StyleDefault")

# custom style
# custom style with STYLES parameter
qs = "?" + "&".join(["%s=%s" % i for i in list({
"MAP": urllib.parse.quote(self.projectPath),
"SERVICE": "WMS",
Expand All @@ -720,6 +720,24 @@ def test_wms_getmap_style(self):
r, h = self._result(self._execute_request(qs))
self._img_diff_error(r, h, "WMS_GetMap_StyleCustom")

# custom style with STYLE parameter
qs = "?" + "&".join(["%s=%s" % i for i in list({
"MAP": urllib.parse.quote(self.projectPath),
"SERVICE": "WMS",
"VERSION": "1.1.1",
"REQUEST": "GetMap",
"LAYERS": "Country_Labels",
"STYLE": "custom",
"FORMAT": "image/png",
"BBOX": "-16817707,-4710778,5696513,14587125",
"HEIGHT": "500",
"WIDTH": "500",
"CRS": "EPSG:3857"
}.items())])

r, h = self._result(self._execute_request(qs))
self._img_diff_error(r, h, "WMS_GetMap_StyleCustom")

def test_wms_getmap_filter(self):
qs = "?" + "&".join(["%s=%s" % i for i in list({
"MAP": urllib.parse.quote(self.projectPath),
Expand Down

0 comments on commit 0dbf432

Please sign in to comment.