How can I get the size of a AGSPreplannedMapArea?

176
2
Jump to solution
10-19-2021 11:31 PM
sven_aanesen_geodata
New Contributor

In the ESRI Field Map app I can easy download preplanned map areas and see how large they are, but I can't find any reference to how to collect this information in the SDK. 

I'm using a AGSOfflineMapTask to collect all the AGSPreplannedMapAreas and load them. Please advise how I can collect the download size of the map package.

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
LukeSmallwood
Esri Contributor

Hi @sven_aanesen_geodata, thanks for getting in touch. The download size of a map area is calculated by looking at each of the package items that comprise the offline map (for example, tpk or vtpk for basemaps and geodatabases for feature data). You can iterate over these items using the getContentItemsWithCompletion method of an AGSPreplannedMapArea. This will give you back a list of AGSPortalItem objects which you can use to check the size of the data.

 

Hope that helps,

 

Luke

View solution in original post

2 Replies
LukeSmallwood
Esri Contributor

Hi @sven_aanesen_geodata, thanks for getting in touch. The download size of a map area is calculated by looking at each of the package items that comprise the offline map (for example, tpk or vtpk for basemaps and geodatabases for feature data). You can iterate over these items using the getContentItemsWithCompletion method of an AGSPreplannedMapArea. This will give you back a list of AGSPortalItem objects which you can use to check the size of the data.

 

Hope that helps,

 

Luke

View solution in original post

sven_aanesen_geodata
New Contributor

Thank you very much!

0 Kudos