<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Using multiple TPK files on one Mapview arcgis in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/using-multiple-tpk-files-on-one-mapview-arcgis/m-p/1012246#M5718</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;We are developing a Xamarin Mobile app that uses arcGIS maps.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have 3 tpk files has different zoom level with whole area and another 6 tpk files with areas splitted into 6 small areas from the whole area. We tried to add these tpk files in the map layers as ArcGISTileLayer from TileCache.&lt;/P&gt;&lt;P&gt;But all the time only the first tpk layer is loaded. Currently using arcGIS .net runtime Xamarin Forms nuget version 100.8.0&lt;BR /&gt;&lt;BR /&gt;Any help would be much appreciated&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Please refer the code below&lt;/P&gt;&lt;P&gt;string[] test = new string[] { "layer1.tpk", "layer2.tpk", "layer3.tpk" , "layer141.tpk", "layer142.tpk", "layer143.tpk", "layer144.tpk", "layer145.tpk", "layer146.tpk" };&lt;/P&gt;&lt;P&gt;Basemap sfBasemap = null;&lt;/P&gt;&lt;P&gt;foreach (var item in test)&lt;BR /&gt;{&lt;BR /&gt;string tileCachePath = string.Empty;&lt;/P&gt;&lt;P&gt;if (Device.RuntimePlatform == Device.UWP)&lt;BR /&gt;tileCachePath = localFileProvider.GetLocalFilePaths(item).Result;&lt;BR /&gt;else&lt;BR /&gt;tileCachePath = localFileProvider.GetLocalFilePath(item);&lt;/P&gt;&lt;P&gt;TileCache tileCache = new TileCache(tileCachePath);&lt;/P&gt;&lt;P&gt;// Create the corresponding layer based on the tile cache.&lt;BR /&gt;ArcGISTiledLayer tileLayer = new ArcGISTiledLayer(tileCache);&lt;BR /&gt;tileLayer.Id = tileLayer.Name;&lt;BR /&gt;try&lt;BR /&gt;{&lt;BR /&gt;tileLayer.LoadStatusChanged += (s, e) =&amp;gt;&lt;BR /&gt;{&lt;BR /&gt;switch (e.Status)&lt;BR /&gt;{&lt;BR /&gt;case Esri.ArcGISRuntime.LoadStatus.Loaded:&lt;BR /&gt;tileLayers.Add(tileLayer);&lt;BR /&gt;break;&lt;BR /&gt;case Esri.ArcGISRuntime.LoadStatus.Loading:&lt;BR /&gt;break;&lt;BR /&gt;case Esri.ArcGISRuntime.LoadStatus.FailedToLoad:&lt;BR /&gt;break;&lt;BR /&gt;case Esri.ArcGISRuntime.LoadStatus.NotLoaded:&lt;BR /&gt;break;&lt;BR /&gt;default:&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;};&lt;BR /&gt;}&lt;BR /&gt;catch (Exception)&lt;BR /&gt;{&lt;BR /&gt;continue;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;await tileLayer.LoadAsync();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;// Create the map with the tile-based basemap.&lt;BR /&gt;Map myMap = new Map(new Basmap(tileLayers));&lt;BR /&gt;// Assign the map to the MapView.&lt;BR /&gt;myMapView.Map = myMap;&lt;BR /&gt;&lt;BR /&gt;await myMapView.Map.LoadAsync();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 24 Dec 2020 08:30:44 GMT</pubDate>
    <dc:creator>Riyasdsrc</dc:creator>
    <dc:date>2020-12-24T08:30:44Z</dc:date>
    <item>
      <title>Using multiple TPK files on one Mapview arcgis</title>
      <link>https://community.esri.com/t5/developers-questions/using-multiple-tpk-files-on-one-mapview-arcgis/m-p/1012246#M5718</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;We are developing a Xamarin Mobile app that uses arcGIS maps.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have 3 tpk files has different zoom level with whole area and another 6 tpk files with areas splitted into 6 small areas from the whole area. We tried to add these tpk files in the map layers as ArcGISTileLayer from TileCache.&lt;/P&gt;&lt;P&gt;But all the time only the first tpk layer is loaded. Currently using arcGIS .net runtime Xamarin Forms nuget version 100.8.0&lt;BR /&gt;&lt;BR /&gt;Any help would be much appreciated&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Please refer the code below&lt;/P&gt;&lt;P&gt;string[] test = new string[] { "layer1.tpk", "layer2.tpk", "layer3.tpk" , "layer141.tpk", "layer142.tpk", "layer143.tpk", "layer144.tpk", "layer145.tpk", "layer146.tpk" };&lt;/P&gt;&lt;P&gt;Basemap sfBasemap = null;&lt;/P&gt;&lt;P&gt;foreach (var item in test)&lt;BR /&gt;{&lt;BR /&gt;string tileCachePath = string.Empty;&lt;/P&gt;&lt;P&gt;if (Device.RuntimePlatform == Device.UWP)&lt;BR /&gt;tileCachePath = localFileProvider.GetLocalFilePaths(item).Result;&lt;BR /&gt;else&lt;BR /&gt;tileCachePath = localFileProvider.GetLocalFilePath(item);&lt;/P&gt;&lt;P&gt;TileCache tileCache = new TileCache(tileCachePath);&lt;/P&gt;&lt;P&gt;// Create the corresponding layer based on the tile cache.&lt;BR /&gt;ArcGISTiledLayer tileLayer = new ArcGISTiledLayer(tileCache);&lt;BR /&gt;tileLayer.Id = tileLayer.Name;&lt;BR /&gt;try&lt;BR /&gt;{&lt;BR /&gt;tileLayer.LoadStatusChanged += (s, e) =&amp;gt;&lt;BR /&gt;{&lt;BR /&gt;switch (e.Status)&lt;BR /&gt;{&lt;BR /&gt;case Esri.ArcGISRuntime.LoadStatus.Loaded:&lt;BR /&gt;tileLayers.Add(tileLayer);&lt;BR /&gt;break;&lt;BR /&gt;case Esri.ArcGISRuntime.LoadStatus.Loading:&lt;BR /&gt;break;&lt;BR /&gt;case Esri.ArcGISRuntime.LoadStatus.FailedToLoad:&lt;BR /&gt;break;&lt;BR /&gt;case Esri.ArcGISRuntime.LoadStatus.NotLoaded:&lt;BR /&gt;break;&lt;BR /&gt;default:&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;};&lt;BR /&gt;}&lt;BR /&gt;catch (Exception)&lt;BR /&gt;{&lt;BR /&gt;continue;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;await tileLayer.LoadAsync();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;// Create the map with the tile-based basemap.&lt;BR /&gt;Map myMap = new Map(new Basmap(tileLayers));&lt;BR /&gt;// Assign the map to the MapView.&lt;BR /&gt;myMapView.Map = myMap;&lt;BR /&gt;&lt;BR /&gt;await myMapView.Map.LoadAsync();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 24 Dec 2020 08:30:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/using-multiple-tpk-files-on-one-mapview-arcgis/m-p/1012246#M5718</guid>
      <dc:creator>Riyasdsrc</dc:creator>
      <dc:date>2020-12-24T08:30:44Z</dc:date>
    </item>
  </channel>
</rss>

