I am developing an iOS app on Xcode 14.2 using Swift 5.7 and ArcGIS Runtime SDK for iOS 100.15.
I am using a map service of Census Data (link as below).
https://khazna.gisqatar.org.qa/fed/rest/services/GISUDBAP/QSA_Census_District_2020/MapServer/
I want to access the Relationship table as listed in attached file QSA.Census_District_2020 (0). I couldn't find any code on developer community to do so. I would be very grateful if anyone can help me in this regards.
Thanks & regards,
Solved! Go to Solution.
Hi there, thank you for reaching out and sorry for the extended reply time.
The relationships table can be accessed by inspecting the mapImageSublayers property of a AGSArcGISMapImageLayer. Each sublayer will have sublayer info that contains a set of relationship infos.
I'll attach a modified version of the view controller that prototypes this out. It will print the following:
Loading MapServer...
Loaded
BLD_Res_Bld_Type_2020_DL
Est_Bldg_Type_2020_DL
Pop_Sex_2020_DL
Pop_Above15_Less15_2020_DL
HousingUnit_Density_2020_DL
Pop_NEcoRel2WrkFrce2020_DL
Pop_Abv10_Edu_Lev_2020_DL
BLD_BuildingStorey_2020_DL
Pop_Occupation_2020_DL
HousingUnit_Use_2020_DL
Est_by_Sector_2020_DL
Pop_Abv15MF_EcNEco_2020_DL
HousingUnit_Type_2020_DL
Pop_Sector_2020_DL
HHold_Indi_FamSze_2020_DL
Pop_AgeGroups_2020_DL
I hope this helps!
Hi there, thank you for reaching out and sorry for the extended reply time.
The relationships table can be accessed by inspecting the mapImageSublayers property of a AGSArcGISMapImageLayer. Each sublayer will have sublayer info that contains a set of relationship infos.
I'll attach a modified version of the view controller that prototypes this out. It will print the following:
Loading MapServer...
Loaded
BLD_Res_Bld_Type_2020_DL
Est_Bldg_Type_2020_DL
Pop_Sex_2020_DL
Pop_Above15_Less15_2020_DL
HousingUnit_Density_2020_DL
Pop_NEcoRel2WrkFrce2020_DL
Pop_Abv10_Edu_Lev_2020_DL
BLD_BuildingStorey_2020_DL
Pop_Occupation_2020_DL
HousingUnit_Use_2020_DL
Est_by_Sector_2020_DL
Pop_Abv15MF_EcNEco_2020_DL
HousingUnit_Type_2020_DL
Pop_Sector_2020_DL
HHold_Indi_FamSze_2020_DL
Pop_AgeGroups_2020_DL
I hope this helps!
Dear David Feinzimer,
Thanks a lot for your great help.
Afroz
Dear David Feinzimer,
Thanks a lot for your help. But now I am facing another issue. I am trying to populate a table with all the fields of a table Pop_Sex_2020_DL. It is populating but only one field though it has 3 fields. I am attaching the code with screen shots. I would be very grateful to you for your further help in this regard.
Thanks & regards
Hi Afroz, can you please indicate which URL value your using for the distService variable?
Thank you,
David
Hi David,
I want to get the values of ENAME, ANAME & DIST_NO fields from table Pop_Sex_2020_DL from URL https://khazna.gisqatar.org.qa/fed/rest/services/GISUDBAP/QSA_Census_District_2020/MapServer/
Thanks,
Afroz
Hi Afroz, the fields ENAME, ANAME & DIST_NO should be accessible from the district feature layer.
I've attached a simplified version of the code. Tapping a green outlined district will produce a console message with the information. For example, tapping the airport:
I hope this helps!
David