<?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: Why can't I load a vtpk in the runtime? in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/why-can-t-i-load-a-vtpk-in-the-runtime/m-p/362964#M2385</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am able to load my vector tile layer successfully on to my map this way ,&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;String vectorTileCachePath = &lt;SPAN&gt;getVectorFilePath&lt;/SPAN&gt;();
ArcGISVectorTiledLayer localVectorTiledLayer = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;ArcGISVectorTiledLayer(vectorTileCachePath)&lt;SPAN style="color: #808080;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;final &lt;/SPAN&gt;ArcGISMap map = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;ArcGISMap(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Basemap(localVectorTiledLayer));
&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.setMap(map);&lt;/PRE&gt;&lt;P&gt;I have one query though,&lt;/P&gt;&lt;P&gt;I could download the vtpk as part of offlineJob earlier , I am not able to generate this vector file anymore using any of my new features as well, not sure what I am missing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 16:55:34 GMT</pubDate>
    <dc:creator>DevendraKhatri</dc:creator>
    <dc:date>2021-12-11T16:55:34Z</dc:date>
    <item>
      <title>Why can't I load a vtpk in the runtime?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/why-can-t-i-load-a-vtpk-in-the-runtime/m-p/362963#M2384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are ZERO examples for loading a ArcGISVectorTiledLayer from a local vtpk.&lt;/P&gt;&lt;P&gt;When do you plan to support that as mentioned in the documentation?&lt;/P&gt;&lt;P&gt;I assumed that's because it is so simple you can do it just by looking at the documentation.&lt;/P&gt;&lt;P&gt;However, I would like to ask for help because it isn't working.&lt;/P&gt;&lt;P&gt;I tried this:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMap &lt;/SPAN&gt;= &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;ArcGISMap();

File contourFile = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;File(basedir + &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"wacountour.vtpk"&lt;/SPAN&gt;);

Log.&lt;SPAN style="font-style: italic;"&gt;i&lt;/SPAN&gt;(&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;TAG&lt;/SPAN&gt;, &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"File " &lt;/SPAN&gt;+ contourFile.getAbsolutePath() + &lt;SPAN style="color: #008000; font-weight: bold;"&gt;" exists? " &lt;/SPAN&gt;+ contourFile.exists());

String contourUri = Uri.&lt;SPAN style="font-style: italic;"&gt;fromFile&lt;/SPAN&gt;(contourFile ).toString();
&lt;SPAN style="color: #808080; font-style: italic;"&gt;
&lt;/SPAN&gt;ArcGISVectorTiledLayer waContoursvtpk = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;ArcGISVectorTiledLayer(contourFile.getAbsolutePath());&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;File mapFile = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;File(basedir + &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"washingtonmap.vtpk"&lt;/SPAN&gt;);

Log.&lt;SPAN style="font-style: italic;"&gt;i&lt;/SPAN&gt;(&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;TAG&lt;/SPAN&gt;, &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"File " &lt;/SPAN&gt;+ mapFile.getAbsolutePath() + &lt;SPAN style="color: #008000; font-weight: bold;"&gt;" exists? " &lt;/SPAN&gt;+ mapFile.exists());

String mapUri = Uri.&lt;SPAN style="font-style: italic;"&gt;fromFile&lt;/SPAN&gt;(mapFile).toString();

&lt;SPAN style="color: #808080; font-style: italic;"&gt;&lt;SPAN&gt;//ArcGISVectorTiledLayer usMap = new ArcGISVectorTiledLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fwww.arcgis.com%2Fsharing%2Frest%2Fcontent%2Fitems%2F91d7cbde681040449a01d853d5e30c84%2Fresources%2Fstyles%2Froot.json%3Ff%3Dpjson" target="_blank"&gt;https://www.arcgis.com/sharing/rest/content/items/91d7cbde681040449a01d853d5e30c84/resources/styles/root.json?f=pjson&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;
&lt;/SPAN&gt;ArcGISVectorTiledLayer waMapvtpk = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;ArcGISVectorTiledLayer(mapFile.getAbsolutePath());


&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMap&lt;/SPAN&gt;.getBasemap().getBaseLayers().add(waMapvtpk);
&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMap&lt;/SPAN&gt;.getBasemap().getBaseLayers().add(waContoursvtpk);&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This fails without any helpful information whatsoever.&lt;/P&gt;&lt;P&gt;Failure is&lt;/P&gt;&lt;P&gt;7003 Invalid response&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;14 File not found.&lt;/P&gt;&lt;P&gt;Depending on the exact arguments to the constructor.&lt;/P&gt;&lt;P&gt;I have checked and made sure the files exist using File.exist().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have checked the same vtpk files in ArcGIS Pro and they show as expected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:55:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/why-can-t-i-load-a-vtpk-in-the-runtime/m-p/362963#M2384</guid>
      <dc:creator>NathanMellor</dc:creator>
      <dc:date>2021-12-11T16:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: Why can't I load a vtpk in the runtime?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/why-can-t-i-load-a-vtpk-in-the-runtime/m-p/362964#M2385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am able to load my vector tile layer successfully on to my map this way ,&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;String vectorTileCachePath = &lt;SPAN&gt;getVectorFilePath&lt;/SPAN&gt;();
ArcGISVectorTiledLayer localVectorTiledLayer = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;ArcGISVectorTiledLayer(vectorTileCachePath)&lt;SPAN style="color: #808080;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;final &lt;/SPAN&gt;ArcGISMap map = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;ArcGISMap(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Basemap(localVectorTiledLayer));
&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.setMap(map);&lt;/PRE&gt;&lt;P&gt;I have one query though,&lt;/P&gt;&lt;P&gt;I could download the vtpk as part of offlineJob earlier , I am not able to generate this vector file anymore using any of my new features as well, not sure what I am missing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:55:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/why-can-t-i-load-a-vtpk-in-the-runtime/m-p/362964#M2385</guid>
      <dc:creator>DevendraKhatri</dc:creator>
      <dc:date>2021-12-11T16:55:34Z</dc:date>
    </item>
  </channel>
</rss>

