<?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: Persistent Tile Cache in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/persistent-tile-cache/m-p/48105#M225</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are simply trying to cache tiles for when you intermittently lose connection, you could try modifying the network cache. You can access it through this static method -&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-requestconfiguration.html#globalNetworkCacheConfiguration" title="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-requestconfiguration.html#globalNetworkCacheConfiguration"&gt;RequestConfiguration Class | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will return a NetworkCacheConfiguration, which will let you&amp;nbsp;change different options -&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-networkcacheconfiguration.html" title="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-networkcacheconfiguration.html"&gt;NetworkCacheConfiguration Class | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This of course will only cache requests that have gone out from the device, so if you lose connection, then move to a brand new place, the tiles will not be there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you know your users are going to be going into areas with bad connection, you could also preemptively take an entire area offline.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is some doc-&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/qt/latest/qml/guide/work-offline.htm" title="https://developers.arcgis.com/qt/latest/qml/guide/work-offline.htm"&gt;Work offline—ArcGIS Runtime SDK for Qt | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example -&amp;nbsp;&lt;A class="link-titled" href="https://github.com/Esri/arcgis-runtime-samples-qt/tree/master/ArcGISRuntimeSDKQt_CppSamples/Layers/ExportTiles" title="https://github.com/Esri/arcgis-runtime-samples-qt/tree/master/ArcGISRuntimeSDKQt_CppSamples/Layers/ExportTiles"&gt;arcgis-runtime-samples-qt/ArcGISRuntimeSDKQt_CppSamples/Layers/ExportTiles at master · Esri/arcgis-runtime-samples-qt · …&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Aug 2020 14:12:17 GMT</pubDate>
    <dc:creator>LucasDanzinger</dc:creator>
    <dc:date>2020-08-26T14:12:17Z</dc:date>
    <item>
      <title>Persistent Tile Cache</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/persistent-tile-cache/m-p/48104#M224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I'm wanting to persist map tiles locally for access while internet access is poor. This will work such that closing the application and reopening it without internet displays locations previously viewed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://code.ornl.gov/jap/qmapcontrol" title="https://code.ornl.gov/jap/qmapcontrol"&gt;QMapControl&lt;/A&gt;&amp;nbsp;has a simple implementation using something like:&lt;/P&gt;&lt;P&gt;p-&amp;gt;map_control = new QMapControl(this);&lt;/P&gt;&lt;P&gt;p-&amp;gt;map_control-&amp;gt;enablePersistentCache(&lt;/P&gt;&lt;P&gt;std::chrono::minutes(30 * 24 * 60),&lt;BR /&gt; QDir(Settings::instance()-&amp;gt;workspace().append("/").append("images")));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suppose the implementation logic would be akin to&amp;nbsp;&lt;A class="link-titled" href="https://code.ornl.gov/jap/qmapcontrol/-/blob/master/QMapControl/src/QMapControl/ImageManager.cpp#L145" title="https://code.ornl.gov/jap/qmapcontrol/-/blob/master/QMapControl/src/QMapControl/ImageManager.cpp#L145"&gt;ImageManager::getImage()&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there something similar available in ArcGIS Runtime 100.8 Qt C++?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2020 14:02:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/persistent-tile-cache/m-p/48104#M224</guid>
      <dc:creator>TomNorby</dc:creator>
      <dc:date>2020-08-25T14:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Persistent Tile Cache</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/persistent-tile-cache/m-p/48105#M225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are simply trying to cache tiles for when you intermittently lose connection, you could try modifying the network cache. You can access it through this static method -&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-requestconfiguration.html#globalNetworkCacheConfiguration" title="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-requestconfiguration.html#globalNetworkCacheConfiguration"&gt;RequestConfiguration Class | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will return a NetworkCacheConfiguration, which will let you&amp;nbsp;change different options -&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-networkcacheconfiguration.html" title="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-networkcacheconfiguration.html"&gt;NetworkCacheConfiguration Class | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This of course will only cache requests that have gone out from the device, so if you lose connection, then move to a brand new place, the tiles will not be there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you know your users are going to be going into areas with bad connection, you could also preemptively take an entire area offline.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is some doc-&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/qt/latest/qml/guide/work-offline.htm" title="https://developers.arcgis.com/qt/latest/qml/guide/work-offline.htm"&gt;Work offline—ArcGIS Runtime SDK for Qt | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example -&amp;nbsp;&lt;A class="link-titled" href="https://github.com/Esri/arcgis-runtime-samples-qt/tree/master/ArcGISRuntimeSDKQt_CppSamples/Layers/ExportTiles" title="https://github.com/Esri/arcgis-runtime-samples-qt/tree/master/ArcGISRuntimeSDKQt_CppSamples/Layers/ExportTiles"&gt;arcgis-runtime-samples-qt/ArcGISRuntimeSDKQt_CppSamples/Layers/ExportTiles at master · Esri/arcgis-runtime-samples-qt · …&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2020 14:12:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/persistent-tile-cache/m-p/48105#M225</guid>
      <dc:creator>LucasDanzinger</dc:creator>
      <dc:date>2020-08-26T14:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: Persistent Tile Cache</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/persistent-tile-cache/m-p/48106#M226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, seems to be exactly what I was looking for, but couldn't find it in the sdk samples.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff8080;"&gt;NetworkCacheConfiguration&lt;/SPAN&gt;&lt;SPAN style="color: #bec0c2;"&gt; &lt;/SPAN&gt;*cache&lt;SPAN style="color: #bec0c2;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #d6bb9a;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #bec0c2;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff8080;"&gt;RequestConfiguration&lt;/SPAN&gt;::globalNetworkCacheConfiguration();&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #bec0c2;"&gt; &lt;/SPAN&gt;cache-&amp;gt;setCacheDirectory(&lt;SPAN style="color: #ff8080;"&gt;QDir&lt;/SPAN&gt;(&lt;SPAN style="color: #ff8080;"&gt;Settings&lt;/SPAN&gt;::instance()&lt;SPAN style="color: #d6bb9a;"&gt;-&amp;gt;&lt;/SPAN&gt;workspace().append(&lt;SPAN style="color: #d69545;"&gt;"/"&lt;/SPAN&gt;).append(&lt;SPAN style="color: #d69545;"&gt;"images"&lt;/SPAN&gt;)).path());&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #bec0c2;"&gt; &lt;/SPAN&gt;cache-&amp;gt;setMaximumCacheSize(&lt;SPAN style="color: #8a602c;"&gt;1e9&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #bec0c2;"&gt; &lt;/SPAN&gt;cache-&amp;gt;setCachePolicy(&lt;SPAN style="color: #ff8080;"&gt;NetworkCachePolicy&lt;/SPAN&gt;::&lt;SPAN style="color: #66a334;"&gt;PreferCache&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #bec0c2;"&gt; &lt;/SPAN&gt;cache-&amp;gt;setNetworkCachingEnabled(&lt;SPAN style="color: #45c6d6;"&gt;true&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since workers might be working anywhere in CONUS it is a lot easier for them to just view their&amp;nbsp;target location while in service and have it saved than to take the time to create an offline map specific to their need.&amp;nbsp;This just works!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2020 18:47:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/persistent-tile-cache/m-p/48106#M226</guid>
      <dc:creator>TomNorby</dc:creator>
      <dc:date>2020-08-26T18:47:13Z</dc:date>
    </item>
  </channel>
</rss>

