Hi Nakul
Thank you for responding. I have tried this approach but my offline TPK does not load - it does not even give me the grid view with the Esri licence statement that I get when the online map loads.
I then added a property statement for the data path but this did not help. Could you please look at the below code and suggest where I may be going wrong?
import QtQuick 2.7
import QtQuick.Controls 2.1
import QtQuick.Controls.Styles 1.4
import QtQuick.Controls.Material 2.1
import ArcGIS.AppFramework 1.0
import ArcGIS.AppFramework.Controls 1.0
import Esri.ArcGISRuntime 100.1
App {
id: app
width: 414
height: 736
property real scaleFactor: AppFramework.displayScaleFactor
property string dataPath: AppFramework.userHomeFolder.filePath("ArcGIS/AppStudio/Data")
// Create MapView that contains a Map
MapView {
id: mapView
anchors.fill: parent
Map {
id: map
Basemap {
ArcGISTiledLayer {
TileCache {
path: dataPath + "hoekwil.tpk"
}
}
}
initialViewpoint: ViewpointCenter {
center: Point { x:22.6; y: -33.9; spatialReference: SpatialReference { wkid: 4326 } }
targetScale: 50000
}
}
// Busy Indicator
BusyIndicator {
anchors.centerIn: parent
height: 48 * scaleFactor
width: height
running: true
Material.accent:"#8f499c"
visible: (mapView.drawStatus === Enums.DrawStatusInProgress)
}
}
}
Thank you.
Regards
Mervyn