Browse Source

layman extent bug

Honza 5 năm trước cách đây
mục cha
commit
47c61dc125
2 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 4 2
      Atlas.py
  2. BIN
      __pycache__/Atlas.cpython-37.pyc

+ 4 - 2
Atlas.py

@@ -2046,7 +2046,7 @@ class Atlas:
         print(url)
         layerName = self.removeUnacceptableChars(layerName)
         epsg = "EPSG:4326"
-        urlWithParams = 'contextualWMSLegend=0&crs='+epsg+'&dpiMode=7&featureCount=10&format=image/png&layers='+layerName+'&styles=&url=' + url
+        urlWithParams = 'contextualWMSLegend=0&crs='+epsg+'&IgnoreReportedLayerExtents=1&dpiMode=7&featureCount=10&format=image/png&layers='+layerName+'&styles=&url=' + url
         print(urlWithParams)
         
         rlayer = QgsRasterLayer(urlWithParams, layerNameTitle, 'wms')
@@ -2054,7 +2054,9 @@ class Atlas:
             print("extents")
             print(rlayer.ignoreExtents())
         except:
+            print("ignoreExtents works only with qgis 3.10 and higher")
             pass # pro qgis 3.10 a vys
+            
            
         if (groupName != ''):
             self.addWmsToGroup(groupName,rlayer)
@@ -2383,7 +2385,7 @@ class Atlas:
         return config   
 
     def layerChanged(self):  
-        print("blabla")
+        
         print(iface.activeLayer())
         if (iface.activeLayer() != None):
             self.menu_saveLocalFile.setEnabled(True)

BIN
__pycache__/Atlas.cpython-37.pyc