Hm, if I understand correctly, you're able to get the locator task from your loaded MMPK but unable to retrieve any LocatorTask.suggestions when you create it that way. But you're able to get the suggestions when you create a LocatorTask component with a .loc file. I hope I have that correct.
Without seeing your code, I'm wondering if your LocatorTask is being instantiated correctly from the MMPK. It can be a little odd, so you might want to check out our MobileMap_SearchAndRoute sample, where we get a LocatorTask from an MMPK rather than creating a component with a URL or path to a .loc file. Is there any possibility you can share some of your code? Alternatively, is there a way you can check if there are load errors or geocode errors? You can check with the following code block:
Connections {
target: locatorTask // the name of your locator task property
function onLoadErrorChanged() {
// Catch any errors when loading the task
console.log(locatorTask.loadError.message, locatorTask.loadError.additionalMessage);
}
function onGeocodeStatusChanged() {
// Catch any errors in the geocode process
if (locatorTask.geocodeStatus === Enums.TaskStatusErrored) {
console.log(locatorTask.error.message, locatorTask.error.additionalMessage);
}
}
function onErrorChanged() {
// Catch any other general errors
console.log(locatorTask.error.message, locatorTask.error.additionalMessage);
}
}
Thank you, I hope that helps, and sorry for the trouble!
Tanner Yould
Samples Product Engineer
ArcGIS Maps SDK for Qt
Esri