Mobile Map Package

662
3
03-21-2019 04:01 AM
DavidPeña1
New Contributor

Hi,

Is there any possibility to close an MMPK file with .NET SDK? I mean, I open in my program the MMPK file in order to retrieve some data with MobileMapPackage.OpenAsync(path) method.

The file stays locked while the program is running because I am not able to found any method to close tha file and release it.

Is there any  method to do that?

Thanks in advance

Tags (1)
0 Kudos
3 Replies
MichaelBranscomb
Esri Frequent Contributor

Hi,

Currently there isn't a high level way to close a Mobile Map Paclage - but we have an issue in our backlog to support this in a future release. I have added your request to that issue.

Cheers

Mike

0 Kudos
JoeHershman
MVP Regular Contributor

I use a brute force approach loop through the layers, get the geodatabase and call Close on the Geodatabase objects.

Not sure what your issue is with locking, I have found even after calling close there still seems to be some lock on the files

MaraStoica4
Occasional Contributor

Take a look at how I've released the references to the mmpk to be able to delete it in the Offline Mapbook example app: 

https://github.com/Esri/mapbook-wpf/blob/4d58ce6e7bb7b6c0308cdc59ea445c6e8e931503/OfflineMapBook/Off...
0 Kudos