本文簡要介紹 python 語言中 arcgis.gis.ViewManager.create
的用法。
用法:
create(name, spatial_reference=None, extent=None, allow_schema_changes=True, updateable=True, capabilities='Query', view_layers=None, view_tables=None, *, description=None, tags=None, snippet=None, overwrite=None, set_item_id=None, preserve_layer_ids=False)
返回:
視圖的
Item
。
創建現有要素服務項目的視圖。如果您需要托管要素圖層表示的數據的不同視圖,則可以創建視圖。例如,您想要應用不同的編輯器設置、樣式或過濾器,或者定義哪些要素或字段可用,或者將數據共享到托管要素圖層以外的不同組。
創建要素圖層視圖時,新的托管要素圖層
Item
會添加到您的內容中。這個新圖層是hosted feature layer
中數據的視圖,這意味著對數據所做的更新會顯示在托管要素圖層及其所有托管要素圖層視圖中。但是,由於視圖是一個單獨的圖層,因此您可以獨立於創建該視圖的托管要素圖層來更改該項目的屬性和設置。例如,您可以允許組織成員編輯托管要素圖層,但與公眾共享隻讀要素圖層視圖。
請參閱Create hosted feature layer views 了解更多詳細信息。
Parameter
Description
name
必需的字符串。新視圖項的名稱
spatial_reference
可選字典。指定視圖的空間參考
extent
可選字典。指定視圖的範圍
allow_schema_changes
可選布爾值。默認為 True。確定視圖是否可以更改服務的架構。
updateable
可選布爾值。默認為 True。確定視圖是否可以更新值
capabilities
可選字符串。將函數指定為逗號分隔的字符串。例如“查詢、更新、刪除”。默認為“查詢”。
view_layers
可選列表。指定您想要在視圖中顯示的
FeatureLayerCollection
中存在的圖層列表。view_tables
可選列表。指定您想要在視圖中顯示的
FeatureLayerCollection
中存在的表列表description
可選字符串。對已發布數據集的用戶友好說明。
tags
可選字符串。以逗號分隔的說明性單詞字符串。
snippet
可選字符串。視圖項目的簡短說明。
overwrite
可選布爾值。如果為 true,則視圖將被覆蓋,False 為默認值。
set_item_id
可選字符串。如果設置,ItemId 由用戶定義,而不是係統。
preserve_layer_ids
可選布爾值。當
True
時,保留層的id
定義。默認為False
。例子:
# USAGE EXAMPLE: Create a veiw from a hosted feature layer >>> crime_fl_item = gis.content.search("2012 crime")[0] >>> view = crime_fl_item.view_manager.create(name=uuid.uuid4().hex[:9], # create random name updateable=True, allow_schema_changes=False, capabilities="Query,Update,Delete")
相關用法
- Python ArcGIS VerizonConnectReveal用法及代碼示例
- Python ArcGIS VoxelLayer用法及代碼示例
- Python ArcGIS Velocity用法及代碼示例
- Python ArcGIS VectorTileLayerManager.edit_tile_service用法及代碼示例
- Python ArcGIS VectorTileLayerManager.update_tiles用法及代碼示例
- Python ArcGIS Velocity.feeds用法及代碼示例
- Python ArcGIS Velocity.bigdata_analytics用法及代碼示例
- Python ArcGIS VectorTileLayerManager.delete_tiles用法及代碼示例
- Python ArcGIS Velocity.realtime_analytics用法及代碼示例
- Python ArcGIS VectorTileLayer.fromitem用法及代碼示例
- Python ArcGIS power用法及代碼示例
- Python ArcGIS APIKeyManager.get用法及代碼示例
- Python ArcGIS KnowledgeGraph.named_object_type_delete用法及代碼示例
- Python ArcGIS ContentManager.unshare_items用法及代碼示例
- Python ArcGIS ImageryLayer.thumbnail用法及代碼示例
- Python ArcGIS FormFieldElement用法及代碼示例
- Python ArcGIS Geometry.true_centroid用法及代碼示例
- Python ArcGIS Site.delete用法及代碼示例
- Python ArcGIS GeoAccessor.bbox用法及代碼示例
- Python arcgis.apps.hub.Initiative.update用法及代碼示例
- Python ArcGIS generate_service_areas用法及代碼示例
- Python ArcGIS build_overview用法及代碼示例
- Python ArcGIS RunInterval用法及代碼示例
- Python ArcGIS describe_dataset用法及代碼示例
- Python ArcGIS acos用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 arcgis.gis.ViewManager.create。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。