Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 7
0
 def loadDomainPanels():
     "A thread safe call to -> mainframe.loadDomainPanels()"
     if (Globals.isThreadUnsafe()):
         dispatcher.Invoke(mainframe.loadDomainPanels)
     else:
         mainframe.loadDomainPanels()
Ejemplo n.º 8
0
 def selectByRect(self):
     "A thread safe call to -> iS3View.selectByRect"
     if (Globals.isThreadUnsafe()):
         dispatcher.Invoke(self.view.selectByRect)
     else:
         self.view.selectByRect()