LocatorTask failed to load mmpk file

87
1
Jump to solution
10-11-2019 10:03 AM
Highlighted
New Contributor

I am trying to load an mmpk file using LocatorTask in an ArcGIS Runtime SDK app but it fails after trying to load it for a few minutes. Any ideas why?

string path = System.IO.Path.Combine(System.IO.Directory.GetCurrentDirectory(), "California.mmpk"); _geocoder = new LocatorTask(new Uri(path)); _geocoder.LoadAsync()
Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Occasional Contributor II

The LocatorTask constructor is if you have locator, either online or local (.loc style as built in Desktop or Pro).  In your case, the locator is in the MMPK, so you first need to open the map package to access the locator.

var mmpk = await MobileMapPackage.OpenAsync(path);
var locatorTask = mmpk.LocatorTask;

View solution in original post

Reply
0 Kudos
1 Reply
Highlighted
Occasional Contributor II

The LocatorTask constructor is if you have locator, either online or local (.loc style as built in Desktop or Pro).  In your case, the locator is in the MMPK, so you first need to open the map package to access the locator.

var mmpk = await MobileMapPackage.OpenAsync(path);
var locatorTask = mmpk.LocatorTask;

View solution in original post

Reply
0 Kudos