Hello, we are using the GeodatabaseSyncTask class to generate offline feature service layers from a feature server, we have noticed that some of the symbology is not displayed properly in some of the layers. When verifying these feature layers in the ArcGIS Online web application the symbology is correct, we wonder if this is expected?
Thanks in advance,
Correct symbology (left side, ArcGIS Online web viewer)
Missing symbology (right side, iOS app using Swift SDK)
Hi Cristhian, when using the GeodatabaseSyncTask to download and sync feature layers from ArcGIS Online, visualization settings (like symbology, renderers, and labeling) are not included in the geodatabase itself. Using OfflineMapTask would be the way to take symbology offline. The GeodatbaseSyncTask only accounts for the underlying data and the default symbology defined in the feature service because it doesn’t know anything about the webmap or the layer’s portal item.
See this answer for a similar question we recently received.
Hi @Ting thank you for your reply, We tried and tested your proposed solution, but we encountered the following questions:
In our case, we need to download individual layers with their custom symbology. With the solution you suggested, using OfflineMapTask, we obtain the entire Web Map. We would like to know if there is a way to download only a single layer with its respective custom symbology.
This is a fair question. ArcGIS does have a file format to support sharing a single layer with its symbology and data - that is the Layer Package. However, Maps SDK doesn't support this feature yet. That is, Maps SDK can neither read the layer package (.lpkx) created by ArcGIS Pro, nor export a layer package. If you'd like to have this feature, please share your use case on our ideas board so we can triage this request.
Currently, we do not use a Web Map in our app; instead, we use a map based on basemap styles. Would this type of map work with the OfflineMapTask implementation, or is it necessary to switch to a Web Map?
OfflineMapTask only works with web maps.
Specific to your usecase, to have everything display offline, you would probably need these pieces and assemble them together:
As you may tell, without using a webmap and OfflineMapTask, it quickly becomes a less tight-knit user story with various pieces floating around. Again, please share your use case on our ideas board if you like to see more support in that regard.
What file extension is generated by an OfflineMapTask job?
OfflineMapTask and the subsequent GenerateOfflineMapJob produces what we internally referred to as an "exploded mobile map package", that is a series of files (NOT a single file) that make a web map work offline. We don't talk about its structure, and it has many implications (edit-ability, locators, network dataset, etc.) that aren't relevant to the end user. So think it as a black box.
Or put it simply: ArcGIS Pro produces .mmpk "Mobile Map Package" as a single file; OfflineMapTask in ArcGIS Maps SDK produces a black box "Offline Map" that contains multiple files to support how it works offline on a mobile device.