在开发过程中发现,当对发布的数据服务目标图层隐藏某些字段时,用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可以解决这个问题。