Can you change the TPK that was initially loaded in your app
<SPAN class="comment token">// SNIP</SPAN>
Item <SPAN class="punctuation token">{</SPAN>
id<SPAN class="punctuation token">:</SPAN> mmpkManager
property string itemName2<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"backgrounddatatpk.tpk"</SPAN>
property string filePath<SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">[</SPAN>fileFolder2<SPAN class="punctuation token">.</SPAN>path<SPAN class="punctuation token">,</SPAN> itemName2<SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="token function">join</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"/"</SPAN><SPAN class="punctuation token">)</SPAN>
property string itemName3<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"backgrounddatatpk.tpk"</SPAN>
property url fileUrl3<SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">[</SPAN>fileFolder3<SPAN class="punctuation token">.</SPAN>url<SPAN class="punctuation token">,</SPAN> itemName3<SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="token function">join</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"/"</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="comment token">// THIS IS FOR THE PATHING TO THE TOPOS ASKED FOR IN THE LoadService.qml</SPAN>
FileFolder <SPAN class="punctuation token">{</SPAN>
id<SPAN class="punctuation token">:</SPAN> fileFolder2
<SPAN class="comment token">//USE THIS WHEN USING PLAYER ON THE DESKTOP</SPAN>
<SPAN class="comment token">//property string exLocation:AppFramework.userHomeFolder.filePath("ArcGIS/AppStudio/Data/QuickReport")</SPAN>
path<SPAN class="punctuation token">:</SPAN> exLocation
Component<SPAN class="punctuation token">.</SPAN>onCompleted<SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">{</SPAN>
console<SPAN class="punctuation token">.</SPAN><SPAN class="token function">log</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"exLocation: "</SPAN> <SPAN class="operator token">+</SPAN> exLocation<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
FileFolder <SPAN class="punctuation token">{</SPAN>
id<SPAN class="punctuation token">:</SPAN> fileFolder3
<SPAN class="comment token">//USE THIS WHEN USING PLAYER ON THE DESKTOP</SPAN>
property string exLocation<SPAN class="punctuation token">:</SPAN>AppFramework<SPAN class="punctuation token">.</SPAN>userHomeFolder<SPAN class="punctuation token">.</SPAN><SPAN class="token function">filePath</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"ArcGIS/AppStudio/Data/QuickReport"</SPAN><SPAN class="punctuation token">)</SPAN>
url<SPAN class="punctuation token">:</SPAN> exLocation3
Component<SPAN class="punctuation token">.</SPAN>onCompleted<SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">{</SPAN>
console<SPAN class="punctuation token">.</SPAN><SPAN class="token function">log</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"exLocation 3 : "</SPAN> <SPAN class="operator token">+</SPAN> exLocation3<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN> <SPAN class="comment token">//SNIP</SPAN>
property string dataPath<SPAN class="punctuation token">:</SPAN> app<SPAN class="punctuation token">.</SPAN>mmpkManager<SPAN class="punctuation token">.</SPAN>filePath
property string dataURL3<SPAN class="punctuation token">:</SPAN> app<SPAN class="punctuation token">.</SPAN>mmpkManager<SPAN class="punctuation token">.</SPAN>fileUrl3
MapView<SPAN class="punctuation token">{</SPAN>
id<SPAN class="punctuation token">:</SPAN> mapView
Map<SPAN class="punctuation token">{</SPAN>
id<SPAN class="punctuation token">:</SPAN> map
Basemap <SPAN class="punctuation token">{</SPAN>
ArcGISTiledLayer <SPAN class="punctuation token">{</SPAN>
url<SPAN class="punctuation token">:</SPAN> dataPath
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="comment token">// SNIP</SPAN>
Button <SPAN class="punctuation token">{</SPAN>
id<SPAN class="punctuation token">:</SPAN> offlineSwitchButton
visible<SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">true</SPAN>
text<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"change basemap"</SPAN>
<SPAN class="keyword token">var</SPAN> location <SPAN class="operator token">=</SPAN> JSON<SPAN class="punctuation token">.</SPAN><SPAN class="token function">stringify</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">{</SPAN>url<SPAN class="punctuation token">:</SPAN> dataURL3<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
onClicked<SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">var</SPAN> mapping <SPAN class="operator token">=</SPAN> ArcGISRuntimeEnvironment<SPAN class="punctuation token">.</SPAN><SPAN class="token function">createObject</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"Basemap"</SPAN><SPAN class="punctuation token">,</SPAN> location<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
mapView<SPAN class="punctuation token">.</SPAN>map <SPAN class="operator token">=</SPAN> mapping<SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>