Adding a tpk Layer Dynamically

Discussion created by philjcollier on Jul 28, 2013
Latest reply on Aug 29, 2013 by jeremy.bridges
Hi all,

I have just begun using the runtime SDK for WPF.  Within my application I am attempting to load another tpk file (ArcGISLocalTiledLayer).  Just using my some of the sdk sample data, on init the application loads the topographic.tpk into my map.  So then I have it set up that the user can select another tpk from a file dialog.  In the code I use layer.clear() and map.add() to try and achieve this.  In my test I attempted to load the sanfrancisco.tpk.  All I get is a blank map.  However if I try and re-load the original topographic.tpk, it will display fine.  It seems that the first tpk you load is the only one that can be re-loaded.  I tried the example "Adding a dynamic layer" from the samples application.  This yielded the same result.  Any ideas on where I am going wrong would be much appreciated.  I am using ArcGIS Runtime 10.1.1 with Visual Studio 2012.

Many thanks

Phil Collier.