<< Click to Display Table of Contents >>
AddLayer
加入圖層到DataFrame中
語法:
AddLayer(dataframe,layer, position)
參數 |
說明 |
參數類型 |
dataframe |
要被加入的資料框架 |
dataframe |
layer |
要加入的layer |
Layer物件 |
position |
加入的位置,可填入 AUTO_ARRANGE |
字串 |
AddLayer使用範例
import sgpy pathname = "D:/temp/Line2.shp" #建立layer物件 layer=sgpy.mapping.Layer(pathname) sgd=sgpy.mapping.MapDocument("current") df=sgd.activeDataFrame #將layer加入DataFrame中 sgpy.mapping.AddLayer(df,layer,"AUTO_ARRANGE") sgpy.RefreshActiveView() del sgd,df |
©2015 Supergeo Technologies Inc. All rights reserved.