Hi, thanks for looking at my question. I am just getting started with ArcGIS Runtime SDK for .NET and I have already built the little sample app - create an offline map.
Now I am on to my own app, upon startup in the xaml an online map is loaded, that works fine. Now I want to switch between a online map and an offline map, the offline map is on my C: drive. If I set up the xaml to load th emap on the C: drive on startup, that works fine.
In my app the online map is the basemap. On my button I can remove the BaseMap with the code: MyMap.Layers.Remove("BaseMap")
I can add the map back in with:
ArcGISTiledMapServiceLayer As New ArcGISTiledMapServiceLayer
ArcGISTiledMapServiceLayer.serviceUri = "http://etc./MapServer"
ArcGISTiledMapServiceLayer.ID = "BaseMap"
MyMap.Layers.Add(ArcGISTiledMapServiceLayer)
Removing the Basemap and adding it back works fine.
Now using a button I want to to do the same with tile package map on my C: drive. The problem is getting the ArcGISTiledMapServiceLayer to recognize the map on the C: drive. C:\Test\Map.tpk.
It is not a ServiceUri or any other extension type that is available.
Thanks for your help. Dale,
Solved! Go to Solution.
Use the ArcGISLocalTiledLayer to load local TPKs. ie
var layer = new ArcGISLocalTiledLayer(@"C:\Test\Map.tpk") { ID = "Local BaseMap" };
Use the ArcGISLocalTiledLayer to load local TPKs. ie
var layer = new ArcGISLocalTiledLayer(@"C:\Test\Map.tpk") { ID = "Local BaseMap" };
Thank you very much, I got it to work with your reply. Dale,