<?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 Re: Loading multiple TPK files on arcgis runtime sdk 100.0 (latest) in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/loading-multiple-tpk-files-on-arcgis-runtime-sdk/m-p/490556#M3398</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you just want to use them as basemap layers you could do something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;Basemap b &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Basemap&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
b&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getBaseLayers&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;addAll&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layersCollection&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
ArcGISMap arcGISMap &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;ArcGISMap&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;b&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

mapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setMap&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arcGISMap&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The layersCollection object would be of type Collection&amp;lt;? extends Layer&amp;gt; so you could create a list of layer objects and then load them into the basemap to then load into the mapview.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 21:35:50 GMT</pubDate>
    <dc:creator>AlexanderNohe1</dc:creator>
    <dc:date>2021-12-11T21:35:50Z</dc:date>
    <item>
      <title>Loading multiple TPK files on arcgis runtime sdk 100.0 (latest)</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/loading-multiple-tpk-files-on-arcgis-runtime-sdk/m-p/490553#M3395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have checked out the example on how you load a custom tile package using &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;Basemap&lt;/SPAN&gt; class and &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;setMap()&lt;/SPAN&gt;. However, there's no indication on how you can load multiple &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;Basemap&lt;/SPAN&gt; class or &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;ArcGISTiledLayer&lt;/SPAN&gt; types&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the previous version of the runtime sdk (10.2.9), we can easily use &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;Map.addLayer()&lt;/SPAN&gt; to add layers, but I cannot find it anywhere on the &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;MapView&lt;/SPAN&gt; class on the latest sdk (I assume &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;setMap&lt;/SPAN&gt;() will just replace the previous one). We have quite a few of .tpk files stored in the device that we would want to display altogether&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anyway to load multiple tpk files? or is the feature not yet in the latest release?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2017 10:44:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/loading-multiple-tpk-files-on-arcgis-runtime-sdk/m-p/490553#M3395</guid>
      <dc:creator>JasonChristian</dc:creator>
      <dc:date>2017-10-17T10:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: Loading multiple TPK files on arcgis runtime sdk 100.0 (latest)</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/loading-multiple-tpk-files-on-arcgis-runtime-sdk/m-p/490554#M3396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/193751"&gt;Jason Christian&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the map object, use the getOperationalLayers() and then use add(Layer layer) to add a layer to the operational layers list of the Map that is set in the mapview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/mapping/ArcGISMap.html#getOperationalLayers()" title="https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/mapping/ArcGISMap.html#getOperationalLayers()"&gt;ArcGISMap| arcgis-android&lt;/A&gt;&amp;nbsp;&amp;lt;-- Should be bookmarked to the getOperationalLayers() method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Alexander&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2017 13:03:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/loading-multiple-tpk-files-on-arcgis-runtime-sdk/m-p/490554#M3396</guid>
      <dc:creator>AlexanderNohe1</dc:creator>
      <dc:date>2017-10-17T13:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Loading multiple TPK files on arcgis runtime sdk 100.0 (latest)</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/loading-multiple-tpk-files-on-arcgis-runtime-sdk/m-p/490555#M3397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You actually need to give the map an instance of &lt;EM&gt;ArcGISMap&lt;/EM&gt; first before accessing the map object from &lt;EM&gt;MapView.getMap()&lt;/EM&gt; (It will be null originally if you don't provide a basemap through &lt;EM&gt;MapView.setMap()&lt;/EM&gt;). Let's say we have 5 TPK files to be loaded. First thing to do is set the 1st TPK file inside the ArcGISMap object and add it using &lt;EM&gt;setMap()&lt;/EM&gt; and then add the remaining 4 files as operational layers inside the ArcGISMap object (which contains the 1st TPK file). Is that how it works?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2017 13:42:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/loading-multiple-tpk-files-on-arcgis-runtime-sdk/m-p/490555#M3397</guid>
      <dc:creator>JasonChristian</dc:creator>
      <dc:date>2017-10-17T13:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Loading multiple TPK files on arcgis runtime sdk 100.0 (latest)</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/loading-multiple-tpk-files-on-arcgis-runtime-sdk/m-p/490556#M3398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you just want to use them as basemap layers you could do something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;Basemap b &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Basemap&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
b&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getBaseLayers&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;addAll&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layersCollection&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
ArcGISMap arcGISMap &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;ArcGISMap&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;b&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

mapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setMap&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arcGISMap&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The layersCollection object would be of type Collection&amp;lt;? extends Layer&amp;gt; so you could create a list of layer objects and then load them into the basemap to then load into the mapview.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:35:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/loading-multiple-tpk-files-on-arcgis-runtime-sdk/m-p/490556#M3398</guid>
      <dc:creator>AlexanderNohe1</dc:creator>
      <dc:date>2021-12-11T21:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: Loading multiple TPK files on arcgis runtime sdk 100.0 (latest)</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/loading-multiple-tpk-files-on-arcgis-runtime-sdk/m-p/490557#M3399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;oh very neat. Thank you very much&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2017 13:59:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/loading-multiple-tpk-files-on-arcgis-runtime-sdk/m-p/490557#M3399</guid>
      <dc:creator>JasonChristian</dc:creator>
      <dc:date>2017-10-17T13:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: Loading multiple TPK files on arcgis runtime sdk 100.0 (latest)</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/loading-multiple-tpk-files-on-arcgis-runtime-sdk/m-p/490558#M3400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're welcome!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2017 14:01:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/loading-multiple-tpk-files-on-arcgis-runtime-sdk/m-p/490558#M3400</guid>
      <dc:creator>AlexanderNohe1</dc:creator>
      <dc:date>2017-10-17T14:01:50Z</dc:date>
    </item>
  </channel>
</rss>

