在開發過程中發現,當對發佈的數據服務目標圖層隱藏某些字段時,用FeatureLayer加載該圖層,就會報錯
“unable to find a field of type 'esriFieldTypeGeometry' in the layer 'fields' information.If you are using a map service layer,features will not have geometry ...”
用ArcGISDynamicMapServiceLayer可以解決這個問題。