Hmm. That service JSON doesn't have a subtypes attribute. Contrast with this version that I found: http://52.64.246.55/arcgis/rest/services/EPA/HFDRegulationRef/MapServer/11?f=json
That service is 10.6.1 compared to your 10.4.1. I'm asking around to see what this means (this is an area of the spec I'm not very familiar with). But it matches what we're seeing in Runtime and if I open that 10.6.1 layer in Runtime I do see the subtypes parsed properly.
You can look on the featureTable's featureSubtypes property. Note, to read this you'll have to ensure the featureTable is loaded (which it will be if the featureLayer is loaded).
Hi Nick,
Thanks a lot for your reply. I tried your suggestions but the subtypeField and featureSubtypes are all empty.
Loading the geodatabase:
I know the HFDHarvestPoly layer has subtype defined but as you can see the subtypeField and featureSubtypes are empty:
What am I doing wrong? Would you have any idea of how to implement subtype support?
Thanks,
Shimin
Hmm. Thanks for the info, Shimin Cai. I'm doing some digging. Where is this feature service hosted? ArcGIS Online or ArcGIS Enterprise? If Enterprise, what version?
Hi Nick,
It's is ArcGIS Enterprise 10.4.1.
Thanks,
Shimin
Thank you. I sent you a DM with some more questions.
I replied to that DM with the feature service json.
Hi Nick,
Here is the feature service json:
{"currentVersion":10.41,"serviceDescription":"HFDSUper","hasVersionedData":false,"supportsDisconnectedEditing":false,"syncEnabled":true,"syncCapabilities":{"supportsRegisteringExistingData":true,"supportsSyncDirectionControl":true,"supportsPerLayerSync":true,"supportsPerReplicaSync":false,"supportsRollbackOnFailure":false,"supportsAsync":true,"supportsAttachmentsSyncDirection":true,"supportsSyncModelNone":true},"supportedQueryFormats":"JSON, AMF","maxRecordCount":100000,"capabilities":"Create,Delete,Extract,Query,Sync,Update,Uploads,Editing","description":"","copyrightText":"robk","spatialReference":{"wkid":3308,"latestWkid":3308},"initialExtent":{"xmin":9860167.134816462,"ymin":4946953.487653883,"xmax":9860835.390870487,"ymax":4947364.722148668,"spatialReference":{"wkid":3308,"latestWkid":3308}},"fullExtent":{"xmin":0,"ymin":-3622637.5840000007,"xmax":1.03139531981E7,"ymax":5858939.346900001,"spatialReference":{"wkid":3308,"latestWkid":3308}},"allowGeometryUpdates":true,"supportsApplyEditsWithGlobalIds":true,"units":"esriMeters","documentInfo":{"Title":"","Author":"","Comments":"HFDSUper","Subject":"HFDSUper","Category":"","Keywords":"HFD"},"layers":[{"id":0,"name":"HFD_Planpolys"},{"id":1,"name":"HFD_Planlines"},{"id":2,"name":"HFDHarvestLine"},{"id":3,"name":"HFD_KoalaStarLine"},{"id":4,"name":"HFD_KoalaStarTree"},{"id":5,"name":"HFDHarvestPoly"},{"id":6,"name":"HFDHarvestPoint"},{"id":7,"name":"HFD_Planpoints"},{"id":8,"name":"HFD_Trees"},{"id":9,"name":"HFDCrossing"},{"id":10,"name":"HFDContractorTree"},{"id":11,"name":"HFDNonCompliance"},{"id":12,"name":"HFD_Dump"},{"id":13,"name":"HFD_IncidentalFF"},{"id":14,"name":"HFDNote"},{"id":15,"name":"Hazard"},{"id":16,"name":"TempNoGoZone"}],"tables":[],"enableZDefaults":false}
Thanks,
Shimin
Thanks. Could you also share the JSON for layer 5 please?
Hi Nick,
Layer 6 has subtype and here is the json:
{"currentVersion":10.41,"id":6,"name":"HFDHarvestPoly","type":"Feature Layer","description":"","copyrightText":"","defaultVisibility":false,"editFieldsInfo":{"creationDateField":"created_date","editDateField":"last_edited_date"},"ownershipBasedAccessControlForFeatures":null,"syncCanReturnChanges":true,"relationships":[],"isDataVersioned":false,"supportsRollbackOnFailureParameter":true,"supportsStatistics":true,"supportsAdvancedQueries":true,"supportsValidateSQL":true,"supportsCalculate":false,"advancedQueryCapabilities":{"supportsPagination":true,"supportsQueryWithDistance":true,"supportsReturningQueryExtent":true,"supportsStatistics":true,"supportsOrderBy":true,"supportsDistinct":true},"geometryType":"esriGeometryPolygon","minScale":200000,"maxScale":0,"extent":{"xmin":746841.3055000007,"ymin":4034351.2918999996,"xmax":9901071.460900001,"ymax":5858939.346900001,"spatialReference":{"wkid":3308,"latestWkid":3308}},"drawingInfo":{"renderer":{"type":"uniqueValue","field1":"PointType","field2":null,"field3":null,"fieldDelimiter":", ","defaultSymbol":null,"defaultLabel":null,"uniqueValueInfos":[{"symbol":{"type":"esriSFS","style":"esriSFSSolid","color":[0,0,0,0],"outline":{"type":"esriSLS","style":"esriSLSSolid","color":[255,170,0,255],"width":4}},"value":"3","label":"UnClassified","description":""},{"symbol":{"type":"esriSFS","style":"esriSFSSolid","color":[0,0,0,0],"outline":{"type":"esriSLS","style":"esriSLSSolid","color":[255,0,197,255],"width":4}},"value":"1","label":"NonHarvestPoly","description":""},{"symbol":{"type":"esriSFS","style":"esriSFSSolid","color":[0,0,0,0],"outline":{"type":"esriSLS","style":"esriSLSSolid","color":[78,78,78,255],"width":4}},"value":"0","label":"HarvestedPoly","description":""}]},"transparency":0,"labelingInfo":null},"hasM":false,"hasZ":false,"allowGeometryUpdates":true,"hasAttachments":false,"supportsApplyEditsWithGlobalIds":true,"htmlPopupType":"esriServerHTMLPopupTypeAsHTMLText","objectIdField":"OBJECTID","globalIdField":"GlobalID","displayField":"Notes","typeIdField":"PointType","fields":[{"name":"PointType","type":"esriFieldTypeInteger","alias":"PoinType","domain":null,"editable":true,"nullable":true},{"name":"HarvestDetails","type":"esriFieldTypeInteger","alias":"HarvestDetails","domain":null,"editable":true,"nullable":true},{"name":"Notes","type":"esriFieldTypeString","alias":"Notes","domain":null,"editable":true,"nullable":true,"length":500},{"name":"GlobalID","type":"esriFieldTypeGlobalID","alias":"GlobalID","domain":null,"editable":false,"nullable":false,"length":38},{"name":"created_user","type":"esriFieldTypeString","alias":"created_user","domain":null,"editable":true,"nullable":true,"length":255},{"name":"created_date","type":"esriFieldTypeDate","alias":"created_date","domain":null,"editable":false,"nullable":true,"length":8},{"name":"last_edited_user","type":"esriFieldTypeString","alias":"last_edited_user","domain":null,"editable":true,"nullable":true,"length":255},{"name":"last_edited_date","type":"esriFieldTypeDate","alias":"last_edited_date","domain":null,"editable":false,"nullable":true,"length":8},{"name":"OBJECTID","type":"esriFieldTypeOID","alias":"OBJECTID","domain":null,"editable":false,"nullable":false},{"name":"PlanID","type":"esriFieldTypeString","alias":"SHAPE.STArea())","domain":null,"editable":false,"nullable":true,"length":50},{"name":"PlanName","type":"esriFieldTypeString","alias":"PlanName","domain":null,"editable":true,"nullable":true,"length":150}],"indexes":[{"name":"UUID_282","fields":"GlobalID","isAscending":true,"isUnique":true,"description":""},{"name":"gdb_ct3_282","fields":"OBJECTID","isAscending":true,"isUnique":false,"description":""},{"name":"S159_idx","fields":"SHAPE","isAscending":true,"isUnique":true,"description":""}],"dateFieldsTimeReference":{"timeZone":"UTC","respectsDaylightSaving":false},"types":[{"id":3,"name":"UnClassified","domains":{},"templates":[{"name":"UnClassified","description":"","prototype":{"attributes":{"PointType":3,"HarvestDetails":null,"Notes":null,"PlanName":null,"created_user":null,"last_edited_user":null}},"drawingTool":"esriFeatureEditToolPolygon"}]},{"id":1,"name":"NonHarvestPoly","domains":{"HarvestDetails":{"type":"codedValue","name":"DmHFDNoHarvest","codedValues":[{"name":"BA Offset","code":21},{"name":"Topo Inaccessible","code":22},{"name":"Steep","code":23},{"name":"Uneconomic","code":24},{"name":"Env Protection","code":25},{"name":"Pre-Merch","code":26},{"name":"Unlogged Missed","code":27},{"name":"Unlogged Other","code":28},{"name":"Alternate Coupe","code":29},{"name":"Unknown","code":31},{"name":"Other - see notes","code":8}]}},"templates":[{"name":"NonHarvestPoly","description":"","prototype":{"attributes":{"PointType":1,"HarvestDetails":null,"Notes":null,"PlanName":null,"created_user":null,"last_edited_user":null}},"drawingTool":"esriFeatureEditToolPolygon"}]},{"id":0,"name":"HarvestedPoly","domains":{"HarvestDetails":{"type":"codedValue","name":"DmHFDSiviculture","codedValues":[{"name":"STS Light","code":1},{"name":"STS Medium","code":2},{"name":"STS Heavy","code":3},{"name":"STS Regen","code":4},{"name":"AGS","code":5},{"name":"Thinning","code":6},{"name":"Other - see notes","code":8},{"name":"Clearfell","code":9},{"name":"STS Release","code":7},{"name":"Early Thinning","code":10},{"name":"Alternate Coupe","code":11}]}},"templates":[{"name":"HarvestedPoly","description":"","prototype":{"attributes":{"PointType":0,"HarvestDetails":2,"Notes":null,"PlanName":null,"created_user":null,"last_edited_user":null}},"drawingTool":"esriFeatureEditToolPolygon"}]}],"templates":[],"maxRecordCount":10000,"supportedQueryFormats":"JSON, AMF, geoJSON","capabilities":"Create,Delete,Extract,Query,Sync,Update,Uploads,Editing","useStandardizedQueries":true} I noticed a layer id discrepancy between the layer json and the service json: the layer id in the service json is 5 but 6 in the service json. Not sure why... The layer list in the service directory:Thanks, Shimin