Select to view content in your preferred language

ArcGISTiledLayer from TPKX file

280
1
05-25-2022 06:40 PM
TayLee
by
Emerging Contributor

I have created a ArcGISTiledLayer that loads a TPKX file. In 2D the tiled layer can be displayed, however in 3D it doesn't display at all.

Any idea on troubleshooting this issue?

// 3D loading the tile package
TileCache tileCache = new TileCache(file.getAbsolutePath());
ArcGISTiledLayer tiledLayer = new ArcGISTiledLayer(tileCache);

// ... after tiledLayer is loaded successfully -
create the scene from the tile layer
sceneView.setScene(new ArcGISScene(new Basemap(tiledLayer)));

Thanks in advance

0 Kudos
1 Reply
PriyankaRupani
Esri Contributor

Hello,

I verified this scenario in 2D and 3D for android. I have a local tpkx file that loads fine.
below is the kotlin code for 3D:

val filePath =
TiledPackageWorldImagery ?: throw IllegalStateException("file directory does not exist")

val tileCache = TileCache(filePath.absolutePath)
val tiledLayer = ArcGISTiledLayer(tileCache)
sceneView.scene = ArcGISScene(Basemap(tiledLayer))

Few questions I have:
Did you get any error message in the logcat? 
Does your app crash in 3D? or does it load the scene but without the tiledlayer?

0 Kudos