本文簡要介紹 python 語言中 arcgis.mapping.forms.FormGroupElement
的用法。
用法:
class arcgis.mapping.forms.FormGroupElement(form=None, elements=None, initial_state=None, description=None, label=None, visibility_expression=None, **kwargs)
基礎:
arcgis.mapping.forms.FormElement
表示表單中的單個組元素。這是 FormElement 的子類,因此您也可以修改這些對象的屬性,例如標簽、說明和visibility_expression。
更多請看:https://developers.arcgis.com/web-map-specification/objects/formGroupElement/
Parameter
Description
form
可選
FormInfo
。包含該組元素的表單。description
可選
str
。組元素的說明label
可選
str
。組元素的標簽visibility_expression
可選
FormExpressionInfo
。條件可見性 Arcade 表達式確定數據收集期間表單元素的可見性initial_state
可選
dict
。選項有“collapsed”和“expanded”例子:
# USAGE EXAMPLE 1: Edit properties on group, add to group from arcgis.mapping.forms import FormExpressionInfo wm = arcgis.mapping.WebMap(item) wm.add_layer(manhole_inspection) form_collection = wm.forms form_info = form_collection.get_form(title="Manhole Inspection") # edit group properties, access elements within group group_element = form_info.get(label="Group 1") grouped_form_element = group_element.get(label="Inspector Name") grouped_form_element.label = "Inspector Name(s) group_element.label = "Inspector Information" group_element.initial_state = "collapsed" # add group, add to group, delete from group, delete group new_group = FormGroupElement(form_info, label="Group 2", initial_state="expanded") group = form_info.add(element=new_group) grouped_element = group.add_field(field_name="inspection_date", label="Inspection Date") group.add_field(field_name="inspection_city", label="Inspection City") grouped_element.label = "Inspection Date" group.move(grouped_element, index=1) group.delete(grouped_element) form_info.delete(group)
相關用法
- Python ArcGIS FormFieldElement用法及代碼示例
- Python ArcGIS FormCollection用法及代碼示例
- Python ArcGIS FormInfo用法及代碼示例
- Python ArcGIS FeatureLayerCollection.extract_changes用法及代碼示例
- Python ArcGIS FeatureLayer.manager用法及代碼示例
- Python ArcGIS FeatureLayer.delete_features用法及代碼示例
- Python ArcGIS FeatureLayer.fromitem用法及代碼示例
- Python ArcGIS Feature.geometry用法及代碼示例
- Python ArcGIS FeatureLayer.query_related_records用法及代碼示例
- Python ArcGIS FeatureLayer用法及代碼示例
- Python ArcGIS FeatureLayer.query_date_bins用法及代碼示例
- Python ArcGIS Feed.metrics用法及代碼示例
- Python ArcGIS FeedsManager.get用法及代碼示例
- Python ArcGIS FeatureLayer.get_unique_values用法及代碼示例
- Python ArcGIS FeatureLayer.generate_renderer用法及代碼示例
- Python ArcGIS FeatureLayer.append用法及代碼示例
- Python ArcGIS FeatureLayer.calculate用法及代碼示例
- Python ArcGIS Feature.set_value用法及代碼示例
- Python ArcGIS FeatureCollection.from_featureset用法及代碼示例
- Python ArcGIS FeedsManager.create用法及代碼示例
- Python ArcGIS FeedsManager.items用法及代碼示例
- Python ArcGIS FeatureLayer.edit_features用法及代碼示例
- Python ArcGIS FLOAT用法及代碼示例
- Python ArcGIS Feature用法及代碼示例
- Python ArcGIS Feature.attributes用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 arcgis.mapping.forms.FormGroupElement。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。