@@ -665,6 +665,76 @@ def test_wms_GetLegendGraphic_ScaleSymbol_Max(self):
665
665
r , h = self ._result (self ._execute_request (qs ))
666
666
self ._img_diff_error (r , h , "WMS_GetLegendGraphic_ScaleSymbol_Max" , max_size_diff = QSize (15 , 15 ))
667
667
668
+ def test_wms_GetLegendGraphic_LAYERFONTCOLOR (self ):
669
+ qs = "?" + "&" .join (["%s=%s" % i for i in list ({
670
+ "MAP" : urllib .parse .quote (self .projectPath ),
671
+ "SERVICE" : "WMS" ,
672
+ "VERSION" : "1.1.1" ,
673
+ "REQUEST" : "GetLegendGraphic" ,
674
+ "LAYER" : "Country,Hello" ,
675
+ "FORMAT" : "image/png" ,
676
+ "HEIGHT" : "500" ,
677
+ "WIDTH" : "500" ,
678
+ "CRS" : "EPSG:3857" ,
679
+ "LAYERFONTCOLOR" : "red"
680
+ }.items ())])
681
+
682
+ r , h = self ._result (self ._execute_request (qs ))
683
+ self ._img_diff_error (r , h , "WMS_GetLegendGraphic_LAYERFONTCOLOR" , max_size_diff = QSize (10 , 2 ))
684
+
685
+ def test_wms_GetLegendGraphic_ITEMFONTCOLOR (self ):
686
+ qs = "?" + "&" .join (["%s=%s" % i for i in list ({
687
+ "MAP" : urllib .parse .quote (self .projectPath ),
688
+ "SERVICE" : "WMS" ,
689
+ "VERSION" : "1.1.1" ,
690
+ "REQUEST" : "GetLegendGraphic" ,
691
+ "LAYER" : "Country,Hello" ,
692
+ "FORMAT" : "image/png" ,
693
+ "HEIGHT" : "500" ,
694
+ "WIDTH" : "500" ,
695
+ "CRS" : "EPSG:3857" ,
696
+ "ITEMFONTCOLOR" : "red" ,
697
+ }.items ())])
698
+
699
+ r , h = self ._result (self ._execute_request (qs ))
700
+ self ._img_diff_error (r , h , "WMS_GetLegendGraphic_ITEMFONTCOLOR" , max_size_diff = QSize (10 , 2 ))
701
+
702
+ def test_wms_GetLegendGraphic_ITEMFONTCOLOR_and_LAYERFONTCOLOR (self ):
703
+ qs = "?" + "&" .join (["%s=%s" % i for i in list ({
704
+ "MAP" : urllib .parse .quote (self .projectPath ),
705
+ "SERVICE" : "WMS" ,
706
+ "VERSION" : "1.1.1" ,
707
+ "REQUEST" : "GetLegendGraphic" ,
708
+ "LAYER" : "Country,Hello" ,
709
+ "FORMAT" : "image/png" ,
710
+ "HEIGHT" : "500" ,
711
+ "WIDTH" : "500" ,
712
+ "CRS" : "EPSG:3857" ,
713
+ "ITEMFONTCOLOR" : "red" ,
714
+ "LAYERFONTCOLOR" : "blue"
715
+ }.items ())])
716
+
717
+ r , h = self ._result (self ._execute_request (qs ))
718
+ self ._img_diff_error (r , h , "WMS_GetLegendGraphic_ITEMFONTCOLOR_and_LAYERFONTCOLOR" , max_size_diff = QSize (10 , 2 ))
719
+
720
+ def test_wms_GetLegendGraphic_ITEMFONTCOLOR_and_LAYERFONTCOLOR_hex (self ):
721
+ qs = "?" + "&" .join (["%s=%s" % i for i in list ({
722
+ "MAP" : urllib .parse .quote (self .projectPath ),
723
+ "SERVICE" : "WMS" ,
724
+ "VERSION" : "1.1.1" ,
725
+ "REQUEST" : "GetLegendGraphic" ,
726
+ "LAYER" : "Country,Hello" ,
727
+ "FORMAT" : "image/png" ,
728
+ "HEIGHT" : "500" ,
729
+ "WIDTH" : "500" ,
730
+ "CRS" : "EPSG:3857" ,
731
+ "ITEMFONTCOLOR" : r"%23FF0000" ,
732
+ "LAYERFONTCOLOR" : r"%230000FF"
733
+ }.items ())])
734
+
735
+ r , h = self ._result (self ._execute_request (qs ))
736
+ self ._img_diff_error (r , h , "WMS_GetLegendGraphic_ITEMFONTCOLOR_and_LAYERFONTCOLOR" , max_size_diff = QSize (10 , 2 ))
737
+
668
738
669
739
if __name__ == '__main__' :
670
740
unittest .main ()
0 commit comments