Select to view content in your preferred language

Invalid Path for Map Layer when using ArcGISLocalTiledLayer

3822
2
04-02-2014 05:18 AM
LukeCatania
Occasional Contributor
I loaded a map cache in genymotion emulator.  When I run the app, I receive the following error

url =/storage/emulated/0/ArcGIS/SAGE/LocalNetwork/SanFrancisco/basemap/Basemap/_alllayers is invalid path.

I am using the OfflineRoutingAndGeocoding sample app and modifying it. 

final String tpkPath = "/ArcGIS/SAGE/LocalNetwork/SanFrancisco/basemap/Basemap/_alllayers";
mTileLayer = new ArcGISLocalTiledLayer(extern + tpkPath);

The map cache I create is from the File/ShareAs/Runtime content... in ArcMap.

If I comment out the lines for the map background to just see the network, it doesn't show up because the background is black. I assume the streets are drawn in black.  How can I change the background color to white or the streets to another color to make sure the network is loading.
0 Kudos
2 Replies
LukeCatania
Occasional Contributor
Error on my part with the path.  That part is fixed.  Error I get now is:

java.lang.RuntimeException: Error reading cache configuration!
0 Kudos
LukeCatania
Occasional Contributor
Well even though the documentation at:

https://developers.arcgis.com/android/api-reference/reference/com/esri/android/map/ags/ArcGISLocalTi...

shows an example of how to acess the cache as:

ArcGISLocalTiledLayer local = new ArcGISLocalTiledLayer("/sdcard/<CacheName>/Layers");

I changed it to:

ArcGISLocalTiledLayer local = new ArcGISLocalTiledLayer("/sdcard/<CacheName>");

and it worked.  My layers subdirectory is actually called "_alllayers".  I supposed maybe it just looks one directory below what you specify looking for L## subdirectories.  Then I though maybe it looks in the conf.xml or conf.cdi files for a path to the bundles, but those files do not contain that info.  Not every cache built would have the "_alllayers" designation as I remember.  A user can change the "Layers" name in ArcMap TOC which I thought is what determines how that is named when building a cache from a map service.  I think my map was designated "_alllayers" because it was created using the runtime content option basemap option.  Unless something changed with how that directory is named in 10.2.2.
0 Kudos