@@ -1302,6 +1302,70 @@ def test_wms_getprint_selection(self):
1302
1302
r , h = self ._result (self ._execute_request (qs ))
1303
1303
self ._img_diff_error (r , h , "WMS_GetPrint_Selection" )
1304
1304
1305
+ def test_wms_getprint_highlight (self ):
1306
+ # default style
1307
+ qs = "?" + "&" .join (["%s=%s" % i for i in list ({
1308
+ "MAP" : urllib .parse .quote (self .projectPath ),
1309
+ "SERVICE" : "WMS" ,
1310
+ "VERSION" : "1.1.1" ,
1311
+ "REQUEST" : "GetPrint" ,
1312
+ "TEMPLATE" : "layoutA4" ,
1313
+ "FORMAT" : "png" ,
1314
+ "map0:EXTENT" : "-33626185.498,-13032965.185,33978427.737,16020257.031" ,
1315
+ "map0:LAYERS" : "Country_Labels" ,
1316
+ "map0:HIGHLIGHT_GEOM" : "POLYGON((-15000000 10000000, -15000000 6110620, 2500000 6110620, 2500000 10000000, -15000000 10000000))" ,
1317
+ "map0:HIGHLIGHT_SYMBOL" : "<StyledLayerDescriptor><UserStyle><Name>Highlight</Name><FeatureTypeStyle><Rule><Name>Symbol</Name><LineSymbolizer><Stroke><SvgParameter name=\" stroke\" >%23ea1173</SvgParameter><SvgParameter name=\" stroke-opacity\" >1</SvgParameter><SvgParameter name=\" stroke-width\" >1.6</SvgParameter></Stroke></LineSymbolizer></Rule></FeatureTypeStyle></UserStyle></StyledLayerDescriptor>" ,
1318
+ "map0:HIGHLIGHT_LABELSTRING" : "Highlight Layer!" ,
1319
+ "map0:HIGHLIGHT_LABELSIZE" : "16" ,
1320
+ "map0:HIGHLIGHT_LABELCOLOR" : "%2300FF0000" ,
1321
+ "map0:HIGHLIGHT_LABELBUFFERCOLOR" : "%232300FF00" ,
1322
+ "map0:HIGHLIGHT_LABELBUFFERSIZE" : "1.5" ,
1323
+ "HEIGHT" : "500" ,
1324
+ "WIDTH" : "500" ,
1325
+ "CRS" : "EPSG:3857"
1326
+ }.items ())])
1327
+
1328
+ r , h = self ._result (self ._execute_request (qs ))
1329
+ assert h .get ("Content-Type" ).startswith ('image' ), r
1330
+ self ._img_diff_error (r , h , "WMS_GetPrint_Highlight" )
1331
+
1332
+ def test_wms_getprint_label (self ):
1333
+ qs = "?" + "&" .join (["%s=%s" % i for i in list ({
1334
+ "MAP" : urllib .parse .quote (self .projectPath ),
1335
+ "SERVICE" : "WMS" ,
1336
+ "VERSION" : "1.1.1" ,
1337
+ "REQUEST" : "GetPrint" ,
1338
+ "TEMPLATE" : "layoutA4" ,
1339
+ "FORMAT" : "png" ,
1340
+ "map0:EXTENT" : "-33626185.498,-13032965.185,33978427.737,16020257.031" ,
1341
+ "map0:LAYERS" : "Country,Hello" ,
1342
+ "HEIGHT" : "500" ,
1343
+ "WIDTH" : "500" ,
1344
+ "CRS" : "EPSG:3857" ,
1345
+ "IDTEXTBOX" : "Updated QGIS composer label"
1346
+ }.items ())])
1347
+
1348
+ r , h = self ._result (self ._execute_request (qs ))
1349
+ self ._img_diff_error (r , h , "WMS_GetPrint_LabelUpdated" )
1350
+
1351
+ qs = "?" + "&" .join (["%s=%s" % i for i in list ({
1352
+ "MAP" : urllib .parse .quote (self .projectPath ),
1353
+ "SERVICE" : "WMS" ,
1354
+ "VERSION" : "1.1.1" ,
1355
+ "REQUEST" : "GetPrint" ,
1356
+ "TEMPLATE" : "layoutA4" ,
1357
+ "FORMAT" : "png" ,
1358
+ "map0:EXTENT" : "-33626185.498,-13032965.185,33978427.737,16020257.031" ,
1359
+ "map0:LAYERS" : "Country,Hello" ,
1360
+ "HEIGHT" : "500" ,
1361
+ "WIDTH" : "500" ,
1362
+ "CRS" : "EPSG:3857" ,
1363
+ "IDTEXTBOX" : ""
1364
+ }.items ())])
1365
+
1366
+ r , h = self ._result (self ._execute_request (qs ))
1367
+ self ._img_diff_error (r , h , "WMS_GetPrint_LabelRemoved" )
1368
+
1305
1369
def test_getLegendGraphics (self ):
1306
1370
"""Test that does not return an exception but an image"""
1307
1371
parms = {
0 commit comments