def run(self):

        from addlayerdialog import AddLayerDialog
        dialog = AddLayerDialog(self)
        dialog.show()
        if dialog.exec_():
            self.addIdahoLayer(dialog.layerdef)
 def run(self):
   from addlayerdialog import AddLayerDialog
   dialog = AddLayerDialog(self)
   dialog.show()
   if dialog.exec_():
     creditVisibility = dialog.ui.checkBox_CreditVisibility.isChecked()
     for layerdef in dialog.selectedLayerDefinitions():
       self.addTileLayer(layerdef, creditVisibility)
    def run(self):
      from addlayerdialog import AddLayerDialog
      dialog = AddLayerDialog(self)
      dialog.show()
      accepted = dialog.exec_()
      if not accepted:
        return

      if self.crs3857 is None:
        self.crs3857 = QgsCoordinateReferenceSystem(3857)

      creditVisibility = dialog.ui.checkBox_CreditVisibility.isChecked()
      for serviceInfo in dialog.selectedServiceInfoList():
        layer = TileLayer(self, serviceInfo, creditVisibility)
        if layer.isValid():
          QgsMapLayerRegistry.instance().addMapLayer(layer)
          self.layers[layer.id()] = layer
 def run(self):
     from addlayerdialog import AddLayerDialog
     dialog = AddLayerDialog(self)
     dialog.show()
     if dialog.exec_():
         creditVisibility = dialog.ui.checkBox_CreditVisibility.isChecked()
         for layerdef in dialog.selectedLayerDefinitions():
             self.addTileLayer(layerdef, creditVisibility)
    def run(self):
        from addlayerdialog import AddLayerDialog
        dialog = AddLayerDialog(self)
        dialog.show()
        accepted = dialog.exec_()
        if not accepted:
            return

        if self.crs3857 is None:
            self.crs3857 = QgsCoordinateReferenceSystem(3857)

        creditVisibility = dialog.ui.checkBox_CreditVisibility.isChecked()
        for serviceInfo in dialog.selectedServiceInfoList():
            layer = TileLayer(self, serviceInfo, creditVisibility)
            if layer.isValid():
                QgsMapLayerRegistry.instance().addMapLayer(layer)
                self.layers[layer.id()] = layer
    def run(self):
        from addlayerdialog import AddLayerDialog
        dialog = AddLayerDialog(self.iface)
        dialog.show()
        accepted = dialog.exec_()
        if not accepted:
            return

        # change crs to EPSG:3857 (WGS 84 / Pseudo-Mercator)
        pseudo_mercator = QgsCoordinateReferenceSystem(3857)
        self.setCrs(pseudo_mercator)

        creditVisibility = dialog.ui.checkBox_CreditVisibility.isChecked()
        for serviceInfo in dialog.selectedServiceInfoList():
            layer = TileLayer(self, serviceInfo, creditVisibility,
                              pseudo_mercator)
            if layer.isValid():
                QgsMapLayerRegistry.instance().addMapLayer(layer)
                self.layers[layer.id()] = layer