Using 100.x codebase as an example, I'm trying to add imagery to my map but am not seeing the layer show up. Source of imagery is a .tpkx, My map is loaded from a .mmpk
EDIT: Added layer.load()... still don't see on map.
func ToggleImagery() async {
do {
if showImagery == true {
let sourceURL = TPUDFacilityInspectorApp.documentsURL.appendingPathComponent(K.imageryTilePackageName)
print(sourceURL)
if FileManager.default.fileExists(atPath: sourceURL.path(percentEncoded: true)) {
appData.imageryLayer = ArcGISTiledLayer(url: sourceURL)
try await appData.imageryLayer.load()
appData.map.insertOperationalLayer(appData.imageryLayer, at:0)
}
} else {
if appData.imageryLayer != nil {
appData.map.removeOperationalLayer(appData.imageryLayer)
appData.imageryLayer = nil
}
}
} catch {
ShowAlert(message: "\(error)")
}
}
Solved! Go to Solution.
One of our GIS guys figured it out for me. The imagery was projected in a different system than the mobile map package.
One of our GIS guys figured it out for me. The imagery was projected in a different system than the mobile map package.
Hi Duane, happy to that you've found a solution.