Пример #1
0
 def addLocalTiledLayer(self, file, id):
     "A thread safe call to -> IS3View.addLocalTiledLayer"
     if (Globals.isThreadUnsafe()):
         func = Action[str, str](self.view.addLocalTiledLayer)
         dispatcher.Invoke(func, file, id)
     else:
         self.view.addLocalTiledLayer(file, id)
Пример #2
0
 def addGraphic(self, graphic):
     "A thread safe call to -> IS3GraphicsLayer.addGraphic"
     if (Globals.isThreadUnsafe()):
         func = Action[IGraphic](self.layer.addGraphic)
         dispatcher.Invoke(func, graphic)
     else:
         self.layer.addGraphic(graphic)
Пример #3
0
 def addLayer(self, layer):
     "A thread safe call to -> IS3View.addLayer"
     if (Globals.isThreadUnsafe()):
         func = Action[IGraphicsLayer](self.view.addLayer)
         dispatcher.Invoke(func, layer)
     else:
         self.view.addLayer(layer)
Пример #4
0
 def setRenderer(self, renderer):
     "A thread safe call to -> IS3GraphicsLayer.setRenderer"
     if (Globals.isThreadUnsafe()):
         func = Action[IRenderer](self.layer.setRenderer)
         dispatcher.Invoke(func, renderer)
     else:
         self.layer.setRenderer(renderer)
Пример #5
0
 def addView(emap, canClose=True):
     "A thread safe call to -> mainframe.addView(emap, canclose)"
     if (Globals.isThreadUnsafe()):
         func = Func[EngineeringMap, bool, Task[IView]](mainframe.addView)
         view = dispatcher.Invoke(func, emap, canClose)
     else:
         view = mainframe.addView(emap, canClose)
     viewWrapper = ViewWrapper(view.Result)
     return viewWrapper
Пример #6
0
 def addShpLayer(self, layerDef, shpFile, start=0, maxFeatures=0):
     "A thread safe call to -> IS3View.addShpLayer"
     if (Globals.isThreadUnsafe()):
         func = Func[LayerDef, str, int, int,
                     Task[IGraphicsLayer]](self.view.addShpLayer)
         layer = dispatcher.Invoke(func, layerDef, shpFile, start,
                                   maxFeatures)
     else:
         self.view.addShpLayer(layerDef, shpFile, start, maxFeatures)
     layerWrapper = GraphicsLayerWrapper(layer.Result)
     return layerWrapper
Пример #7
0
 def loadDomainPanels():
     "A thread safe call to -> mainframe.loadDomainPanels()"
     if (Globals.isThreadUnsafe()):
         dispatcher.Invoke(mainframe.loadDomainPanels)
     else:
         mainframe.loadDomainPanels()
Пример #8
0
 def selectByRect(self):
     "A thread safe call to -> IS3View.selectByRect"
     if (Globals.isThreadUnsafe()):
         dispatcher.Invoke(self.view.selectByRect)
     else:
         self.view.selectByRect()