Issue with Icons and Patterns in offline maps

03-05-2019 05:18 PM
New Contributor II


I've created a custom vector tile style, including changing colors and setting up Icons and Patterns. I want to use this customized layer in an application using the ArcGISRuntime 100.4. My custom style shows up correctly when I'm online, but when I create an offline map using the OfflineMapTask.GenerateOfflineMap method, the custom style is incomplete. I can see the color changes, but the Icons and Patterns are missing.

I think I've narrowed down the problem: when I look in the [...]item_resource_cache folder created when I download my offline map, the folder contains a "styles" sub-folder, but no "sprites" subfolder. If I manually create a sprites folder and populate it with sprite.json and sprite.png files then the desired Icons and Patterns do show up in the offline map.
When I use ExportVectorTilesTask.ExportStyleResourceCache to export just the style resource I see the same thing; the styles subfolder is downloaded but the sprites subfolder is not, so I can't workaround the issue by downloading the style separately.

Is support for Icons and Patterns offline in the works? Can anyone suggest a way to get it working currently?

Update: I had previously only tried with the built-in Icons and Patterns in the ArcGIS Vector Tile Style Editor (beta), without adding my own images. When I tried adding my own image, it was added as a sprite in resources/styles and worked fine in the offline map. It's only the built-in ones that are ignored, so it may be a bug.

0 Kudos
0 Replies