@@ -434,6 +434,42 @@ def test_wms_GetLegendGraphic_ItemFont(self):
434434 self ._img_diff_error (r , h , "WMS_GetLegendGraphic_ItemFont" , max_size_diff = QSize (1 , 1 ))
435435
436436 def test_wms_GetLegendGraphic_BBox (self ):
437+ qs = "?" + "&" .join (["%s=%s" % i for i in list ({
438+ "MAP" : urllib .parse .quote (self .projectPath ),
439+ "SERVICE" : "WMS" ,
440+ "VERSION" : "1.1.1" ,
441+ "REQUEST" : "GetLegendGraphic" ,
442+ "LAYER" : "Country,Hello,db_point" ,
443+ "LAYERTITLE" : "FALSE" ,
444+ "FORMAT" : "image/png" ,
445+ "SRCHEIGHT" : "500" ,
446+ "SRCWIDTH" : "500" ,
447+ "BBOX" : "-151.7,-38.9,51.0,78.0" ,
448+ "CRS" : "EPSG:4326"
449+ }.items ())])
450+
451+ r , h = self ._result (self ._execute_request (qs ))
452+ self ._img_diff_error (r , h , "WMS_GetLegendGraphic_BBox" )
453+
454+ def test_wms_GetLegendGraphic_BBox2 (self ):
455+ qs = "?" + "&" .join (["%s=%s" % i for i in list ({
456+ "MAP" : urllib .parse .quote (self .projectPath ),
457+ "SERVICE" : "WMS" ,
458+ "VERSION" : "1.1.1" ,
459+ "REQUEST" : "GetLegendGraphic" ,
460+ "LAYER" : "Country,Hello,db_point" ,
461+ "LAYERTITLE" : "FALSE" ,
462+ "FORMAT" : "image/png" ,
463+ "SRCHEIGHT" : "500" ,
464+ "SRCWIDTH" : "500" ,
465+ "BBOX" : "-76.08,-6.4,-19.38,38.04" ,
466+ "SRS" : "EPSG:4326"
467+ }.items ())])
468+
469+ r , h = self ._result (self ._execute_request (qs ))
470+ self ._img_diff_error (r , h , "WMS_GetLegendGraphic_BBox2" )
471+
472+ def test_wms_GetLegendGraphic_BBox_Fallback (self ):
437473 qs = "?" + "&" .join (["%s=%s" % i for i in list ({
438474 "MAP" : urllib .parse .quote (self .projectPath ),
439475 "SERVICE" : "WMS" ,
@@ -451,7 +487,7 @@ def test_wms_GetLegendGraphic_BBox(self):
451487 r , h = self ._result (self ._execute_request (qs ))
452488 self ._img_diff_error (r , h , "WMS_GetLegendGraphic_BBox" )
453489
454- def test_wms_GetLegendGraphic_BBox2 (self ):
490+ def test_wms_GetLegendGraphic_BBox2_Fallback (self ):
455491 qs = "?" + "&" .join (["%s=%s" % i for i in list ({
456492 "MAP" : urllib .parse .quote (self .projectPath ),
457493 "SERVICE" : "WMS" ,
@@ -477,8 +513,8 @@ def test_wms_GetLegendGraphic_EmptyLegend(self):
477513 "REQUEST" : "GetLegendGraphic" ,
478514 "LAYER" : "QGIS%20Server%20Hello%20World" ,
479515 "FORMAT" : "image/png" ,
480- "HEIGHT " : "840" ,
481- "WIDTH " : "1226" ,
516+ "SRCHEIGHT " : "840" ,
517+ "SRCWIDTH " : "1226" ,
482518 "BBOX" : "10.38450,-49.6370,73.8183,42.9461" ,
483519 "SRS" : "EPSG:4326" ,
484520 "SCALE" : "15466642"
@@ -499,8 +535,8 @@ def test_wms_GetLegendGraphic_wmsRootName(self):
499535 "REQUEST" : "GetLegendGraphic" ,
500536 "LAYER" : "QGIS%20Server%20-%20Grouped%20Layer" ,
501537 "FORMAT" : "image/png" ,
502- "HEIGHT " : "840" ,
503- "WIDTH " : "1226" ,
538+ "SRCHEIGHT " : "840" ,
539+ "SRCWIDTH " : "1226" ,
504540 "BBOX" : "609152,5808188,625492,5814318" ,
505541 "SRS" : "EPSG:25832" ,
506542 "SCALE" : "38976"
@@ -518,8 +554,8 @@ def test_wms_GetLegendGraphic_wmsRootName(self):
518554 "REQUEST" : "GetLegendGraphic" ,
519555 "LAYER" : "All_grouped_layers" ,
520556 "FORMAT" : "image/png" ,
521- "HEIGHT " : "840" ,
522- "WIDTH " : "1226" ,
557+ "SRCHEIGHT " : "840" ,
558+ "SRCWIDTH " : "1226" ,
523559 "BBOX" : "609152,5808188,625492,5814318" ,
524560 "SRS" : "EPSG:25832" ,
525561 "SCALE" : "38976"
@@ -537,8 +573,8 @@ def test_wms_GetLegendGraphic_ScaleSymbol_Min(self):
537573 "REQUEST" : "GetLegendGraphic" ,
538574 "LAYER" : "testlayer" ,
539575 "FORMAT" : "image/png" ,
540- "HEIGHT " : "550" ,
541- "WIDTH " : "850" ,
576+ "SRCHEIGHT " : "550" ,
577+ "SRCWIDTH " : "850" ,
542578 "BBOX" : "-608.4,-1002.6,698.2,1019.0" ,
543579 "CRS" : "EPSG:4326"
544580 }.items ())])
@@ -553,8 +589,8 @@ def test_wms_GetLegendGraphic_ScaleSymbol_Min(self):
553589 "REQUEST" : "GetLegendGraphic" ,
554590 "LAYER" : "testlayer" ,
555591 "FORMAT" : "image/png" ,
556- "HEIGHT " : "550" ,
557- "WIDTH " : "850" ,
592+ "SRCHEIGHT " : "550" ,
593+ "SRCWIDTH " : "850" ,
558594 "BBOX" : "-1261.7,-2013.5,1351.5,2029.9" ,
559595 "CRS" : "EPSG:4326"
560596 }.items ())])
@@ -570,8 +606,8 @@ def test_wms_GetLegendGraphic_ScaleSymbol_Scaled_01(self):
570606 "REQUEST" : "GetLegendGraphic" ,
571607 "LAYER" : "testlayer" ,
572608 "FORMAT" : "image/png" ,
573- "HEIGHT " : "550" ,
574- "WIDTH " : "850" ,
609+ "SRCHEIGHT " : "550" ,
610+ "SRCWIDTH " : "850" ,
575611 "BBOX" : "31.8,-12.0,58.0,28.4" ,
576612 "CRS" : "EPSG:4326"
577613 }.items ())])
@@ -587,8 +623,8 @@ def test_wms_GetLegendGraphic_ScaleSymbol_Scaled_02(self):
587623 "REQUEST" : "GetLegendGraphic" ,
588624 "LAYER" : "testlayer" ,
589625 "FORMAT" : "image/png" ,
590- "HEIGHT " : "550" ,
591- "WIDTH " : "850" ,
626+ "SRCHEIGHT " : "550" ,
627+ "SRCWIDTH " : "850" ,
592628 "BBOX" : "25.3,-22.1,64.5,38.5" ,
593629 "CRS" : "EPSG:4326"
594630 }.items ())])
@@ -604,8 +640,8 @@ def test_wms_GetLegendGraphic_ScaleSymbol_Max(self):
604640 "REQUEST" : "GetLegendGraphic" ,
605641 "LAYER" : "testlayer" ,
606642 "FORMAT" : "image/png" ,
607- "HEIGHT " : "550" ,
608- "WIDTH " : "850" ,
643+ "SRCHEIGHT " : "550" ,
644+ "SRCWIDTH " : "850" ,
609645 "BBOX" : "44.8,8.0,45.0,8.4" ,
610646 "CRS" : "EPSG:4326"
611647 }.items ())])
@@ -620,8 +656,8 @@ def test_wms_GetLegendGraphic_ScaleSymbol_Max(self):
620656 "REQUEST" : "GetLegendGraphic" ,
621657 "LAYER" : "testlayer" ,
622658 "FORMAT" : "image/png" ,
623- "HEIGHT " : "550" ,
624- "WIDTH " : "850" ,
659+ "SRCHEIGHT " : "550" ,
660+ "SRCWIDTH " : "850" ,
625661 "BBOX" : "43.6,6.2,46.2,10.2" ,
626662 "CRS" : "EPSG:4326"
627663 }.items ())])
0 commit comments