Offline Legend

2095
1
Jump to solution
04-23-2014 12:01 PM
VIKRANTKRISHNA
New Contributor III
Is it possible to build legend from offline layers?
0 Kudos
1 Solution

Accepted Solutions
DiveshGoyal
Esri Regular Contributor
Yes, an offline layer is basically an AGSFeatureTableLayer. This layer has a renderer. You can get to the symbols being  used by the renderer and ask for a swatch of each symbol. These swatches can then be displayed in a legend.

See https://developers.arcgis.com/ios/api-reference/interface_a_g_s_symbol.html#a64ad2116214fae6b0b0609a...

Also see Offline Feature Editing Sample. This sample gets swatches for all the symbols being used by the offline layers and displays it in a Feature Template Picker. This is similar to the code you would need to display in a legend.

View solution in original post

0 Kudos
1 Reply
DiveshGoyal
Esri Regular Contributor
Yes, an offline layer is basically an AGSFeatureTableLayer. This layer has a renderer. You can get to the symbols being  used by the renderer and ask for a swatch of each symbol. These swatches can then be displayed in a legend.

See https://developers.arcgis.com/ios/api-reference/interface_a_g_s_symbol.html#a64ad2116214fae6b0b0609a...

Also see Offline Feature Editing Sample. This sample gets swatches for all the symbols being used by the offline layers and displays it in a Feature Template Picker. This is similar to the code you would need to display in a legend.
0 Kudos