Offline Geocode not running through Appstudio Player

Discussion created by m.afzal_313 on Mar 3, 2017
Latest reply on Mar 8, 2017 by m.afzal_313

 I have created an offline application which uses the LocalLocator to perform offline Geocode. The app loads fully when testing through the Qt Creator and Appstudio for ArcGIS  but the LocalLocator doesn't work when the app's loaded through the Appstudio Player (Error: Locator not initialized).

Following code i running:


    property string dataPath: AppFramework.userHomeFolder.filePath("ArcGIS/AppStudio/Data")
    property string inputLocFolder: "ABCLocator"
    property string outputLocFolder: dataPath + "/" + inputLocFolder
    property LocalLocator localLocator
    function copyLocalData() {
        var resourceFolder = AppFramework.fileFolder(app.folder.folder(inputLocFolder).path);
        var fileNames = resourceFolder.fileNames("*", true);
        for (var i = 0; i < fileNames.length; i++) {
            var fileName = fileNames[i];
            fileName = fileName.replace(/\\/g, "/");
            var outputFileFolder = AppFramework.fileFolder(outputLocFolder);
            var outputFileInfo = AppFramework.fileInfo(outputFileFolder.filePath(fileName));
            resourceFolder.copyFile(fileName, outputFileFolder.filePath(fileName));
    Component.onCompleted: {
        arcGISLocalTiledLayerBasemap.path = outputLocFolder + "/streetmap.tpk";
        localLocator = ArcGISRuntime.createObject("LocalLocator", {path: outputLocFolder + "/plot_locator.loc"});

Tpk file and all locator files (loc,lox,locb,loc.xml) properly created in ArcGIS/AppStudio/Data/ABCLocator but application not
working in App studio Player.

Please Help me regarding this issue.


Advance Thanks.