Tile Package not found in content

580
2
Jump to solution
04-29-2021 03:27 AM
Labels (2)
BertKraan1
Occasional Contributor III

I made an Administrative Report and I see the majority of my file storage is used by "World_Topo_Map-(longstringofchars)" Tile Packages:

BertKraan1_0-1619691758257.png

But when I look in the content section in Argis Online I can't find any of those files.

I have two Tile layers and two Vector Tile Packages but these I can't find anywhere.

 

How can I get hold of those "World_Topo_Map-xxxx" to see to what map they belong and to determine if I still need them? They account for 90+% of my storage credits.

 

regards,

Bert

 

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

Hm. I'd thought it would be related to the basemap items, but I don't actually see them when I run my own report.

Could these be "offline areas" that were created from the Esri basemaps?

Unfortunately, AGOL lacks the capability to use the python functions "dependent_to" and "dependent_on", but you could iterate over web map items and pull their operational layers to try and find these packages. That is, if they're being used in web maps, not in some offline space.

from arcgis.gis import GIS
from arcgis.mapping import WebMap

tile_ids = ['list', 'of', 'itemIDs']

webmaps = gis.content.search('', item_type='Web Map', max_items=-1)

map_list = []

for w in webmaps:
    wm = WebMap(w)
    for b in wm.basemap.baseMapLayers:
        try:
            b.itemId
        except AttributeError:
            continue
        else:
            if b.itemId in tile_ids:
                map_list.append(w)
                
    for l in wm.layers:
        try:
            l.itemId
        except AttributeError:
            continue
        else:
            if l.itemId in tile_ids:
                map_list.append(w)

 

The resulting map_list should be all the web maps which reference the item IDs specified.

- Josh Carlson
Kendall County GIS

View solution in original post

0 Kudos
2 Replies
jcarlson
MVP Esteemed Contributor

Hm. I'd thought it would be related to the basemap items, but I don't actually see them when I run my own report.

Could these be "offline areas" that were created from the Esri basemaps?

Unfortunately, AGOL lacks the capability to use the python functions "dependent_to" and "dependent_on", but you could iterate over web map items and pull their operational layers to try and find these packages. That is, if they're being used in web maps, not in some offline space.

from arcgis.gis import GIS
from arcgis.mapping import WebMap

tile_ids = ['list', 'of', 'itemIDs']

webmaps = gis.content.search('', item_type='Web Map', max_items=-1)

map_list = []

for w in webmaps:
    wm = WebMap(w)
    for b in wm.basemap.baseMapLayers:
        try:
            b.itemId
        except AttributeError:
            continue
        else:
            if b.itemId in tile_ids:
                map_list.append(w)
                
    for l in wm.layers:
        try:
            l.itemId
        except AttributeError:
            continue
        else:
            if l.itemId in tile_ids:
                map_list.append(w)

 

The resulting map_list should be all the web maps which reference the item IDs specified.

- Josh Carlson
Kendall County GIS
0 Kudos
BertKraan1
Occasional Contributor III

Hi Josh,

Your suggestion about them being part of the "offline area's" seems to be right: a 'World-Topo-Map" item is part of the map_area files (which I use quite a lot since we often have spotty connections in the forest.)

BertKraan1_0-1620038363154.png

To test I created another offline area and ran an administrative report afterwards, this resulted in four new items amongst which the World_Topo_Map_xxxxx:

BertKraan1_1-1620040416545.png

 

Deleting the offline map removes those files including the tile package.

So one offline map results in a maparea, a tile package and a sqlite geodatabase for eacht layer in the offline map. I can find which tilepackage belongs to which offline map area by comparing the creation date.

 

Thanks for your tip!

 

0 Kudos