Select to view content in your preferred language

Transparency of downloaded Vector Tile Packages

310
2
02-12-2025 12:06 PM
KarenRobine1
Regular Contributor

I am downloading an Imagery Hybrid Basemap with a Tiled Layer and an ArcGISVectorTiledLayer (this is the Hybrid reference layer for Offline use); For example, https://blm-egis.maps.arcgis.com/home/item.html?id=30d6b8271e1849cd9c3042060001f425).  The ArcGISVectorTiledLayer downloads fine. However, the background is not transparent which makes it impossible to place on top of it's respective Imagery Tile Package.  I've tried several different Imagery Hybrid Reference Layers, but none seem to work..  I'm pretty sure the background is a Basemap (see picture below).

I am able to use the ArcGIS Pro Download Map functionality and the Imagery Hybrid Vector Tile Layer downloads just fine. It's background is always transparent and can be placed on top of it's respective Imagery Layer.

Ideas?

Here's a picture of the .vtpk from ArcGIS Pro

ImageryHybrid.PNG

0 Kudos
2 Replies
pnarkhede
Esri Contributor

Thank you for sharing your issue. From what you’ve described, it seems like the transparency problem may stem from how the basemap and reference layers are being configured in your map. To better assist you, I’d like to clarify a few points and provide some suggestions:

  1. Could you confirm what layers are included in both your basemap's `BaseLayers` and `ReferenceLayers` collections, as well as in your map's `OperationalLayers` collection? This will help us understand how the layers are being stacked and whether the background issue is caused by an unintended layer configuration.
  2. Typically, the ArcGIS Vector Tile Layer should have a transparent background by default. If this is not the case, it may be worth checking whether any modifications were made to its style or rendering settings during export or download.
  3. If possible, please share more details about how you’re downloading and configuring these layers for offline use. Specifically, knowing whether this issue occurs only in specific environments or across all platforms will help us narrow down potential causes.

Let us know if this helps or if further clarification is needed!

0 Kudos
KarenRobine1
Regular Contributor
Thanks for responding. This problem happens to more than basemaps. Here's my use case:
My Maui App has several basemaps.  The user creates a small extent and clicks Download.  
In the code, I need to download all the basemaps, plus other data such as hillshade and contours, as well as a mobile map package.
Then, once they go offline with the data, I layer all the data again based on whatever basemap is active. They can change basemaps at any time.
In this scenario, I need transparency set for layers on top as I need to be able to see layers on bottom (setting Opacity for Vector Tile Packages does not help).
 
One of my online basemaps is the following: https://maps.arcgis.com/home/item.html?id=ae04a03962e4487c9bc0af644a472437  (note: I've tried with others as well, same problem).
In this scenario, I download the Imagery and the Vector Tile Package separately so I can store the .vtpk and .tpkx on the users device.
 
For imagery, code is as follows:
 
ExportTileCacheParameters? parameters = new()
{
   AreaOfInterest = geom,
   CompressionQuality = (double)compQual //I extracted this from the Service above
};
foreach (var lvl in levels)
{
   parameters.LevelIds.Add(Int32.Parse(lvl));
}  
ExportTileCacheTask offlineTask = await ExportTileCacheTask.CreateAsync(uri);
 
Place this in a job and push results to Imagery.tpkx file
 
For Vector Tiles, code is as follows:
 
ExportVectorTilesTask exportTask = await ExportVectorTilesTask.CreateAsync(lyrSource); //I've also tried with PortalItem. Same results
ExportVectorTilesParameters vecParam = await exportTask.CreateDefaultExportVectorTilesParametersAsync(envelope, mapScale);
vecParam.EsriVectorTilesDownloadOption = EsriVectorTilesDownloadOption.UseReducedFontsService;
vecParam.EsriVectorTilesDownloadOption = EsriVectorTilesDownloadOption.UseReducedFontsService; //Ive tried with UseOriginalService as well
ExportVectorTilesJob? bmapVTJob = exportTask.ExportVectorTiles(vecParam, <vectorTileCachepath>, <path to resources>));
 
Run job and place in appropriate ImageryHybrid.vtpk file.
I run this on https://www.arcgis.com/home/item.html?id=0769f07cc0c3453faec703e77dbb3459 for example (I've tried with other Hybrid Reference layers as well. Same results)
 
For this case, the resulting Vector Tile Package (ImageryHybrid.vtpk) always has a basemap behind it (image above) and does NOT allow me to overlay it on top of the Imagery.tpk.
 
Note:
I have the exact same problem when I try to download a Hillshade.vtpk file.  However, if I download a Contours.vtpk file, it works great.  FYI: I'm able to obtain all my .vtpk files and view them in ArcGIS Pro, so I can see the background issue there as well.
 
Note2:
In ArcGIS Pro, if I use the "Download Map" option the resulting Hybrid Reference layer looks great after it's downloaded, but when I use Windows Explorer to make a copy, the copy shows a background similar to what I showed in the image above. 
 
Based on your #3 question above, I have the same problems when I run in Windows and Android (emulator  and real devices).  Have not setup iOS yet.
 
Thoughts?
  
0 Kudos