<< Click to Display Table of Contents >>
RemoveLayer
從DataFrame中移除特定圖層 (圖層存在時,才移除)
語法:
RemoveLayer(layer)
參數 |
說明 |
參數類型 |
layer |
要移除的layer |
Layer物件 |
RemoveLayer使用範例
import sgpy pathname = "D:/temp/Line2.shp" layer=sgpy.mapping.Layer(pathname) sgd=sgpy.mapping.MapDocument("current") df=sgd.activeDataFrame sgpy.mapping.AddLayer(df,layer,"AUTO_ARRANGE") #移除加入的圖層 sgpy.mapping.RemoveLayer(df,layer) sgpy.RefreshActiveView() del sgd,df |
©2015 Supergeo Technologies Inc. All rights reserved.