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