arcgis appi for javascript定義Layerine fo 2方式

1270 ワード

1.単一
var layerInfos = [{
'featureLayer':featureLayer,
'showAttachments':false,
'showDeleteButton':false,
'fieldInfos':[
{'fieldName':'name','label':'Name'},
{'fieldName':'email','label':'Email'},
{'fieldName':'phone','label':'Phone','customField':myDijit},
{'fieldName':'note','label':'Details', 'stringFieldOption':esri.dijit.AttributeInspector.STRING_FIELD_OPTION_TEXTAREA},
{'fieldName':'notedate','label':'Date'}
]
}]; 
2.すべてを取得する
featureLayerInfos = arrayUtils.map(event.layers, function (layer) {
       return {
         "featureLayer": layer.layer,
         showAttachments: false,
         disableAttributeUpdate:false,//  infowindow  
         //isEditable: false,//      
         disableGeometryUpdate:true,//        
         fieldInfos: [
             {fieldName: 'NAME_', visible: true,isEditable:true, label:'  :'},
             {fieldName: 'CODE_', visible: true,isEditable:true, label:'  :'}
         ]
       };
});
導入するべきなのは導入を覚えています.