Hello,
I would like to be able to estimate the cost of caching the full extent of a Feature Layer hosted in the ArcGIS Location Platform when setting "FeatureRequestMode.ManualCache".
I am assuming that when using "FeatureRequestMode.ManualCache", after the layer is cached, queries are local.
Since the "FeatureRequestMode.ManualCache" is different from an offline workflow, when are queries to the server actually happening? When we firstly install the app and access ArcGISMap and its operational layers? When there is a configuration change? When the app recomposes?
And also, are the populateFromService parameters bin the code below correct?
Thank you very much in advance,
Adriana
Solved! Go to Solution.
>What about when the user closes the app and open it again in a later time?
When user closes app and opens, its a completely new instance of FeatureLayer and FeatureTable. So when the viewmodel is initiated and populateFromService is called, it fetches them from the service again.
Rama
Hi,
As mentioned in the API ref doc here , in this mode the queries to the service are made only when there is an explicit call to the method populateFromService. Rest of the queries happen on the local cache only. Your usage of populateFromService looks fine.
Thanks
Rama
Thank you very much. The populateFromService is in a ViewModel.
I understand that the ViewModel survives configuration changes. What about when the user closes the app and open it again in a later time?
Thank you immensely,
Adriana
I mean, considering that the method is in a ViewModel (the same where the FeatureLayer and ArcGISMap are declared, when the user closes the app and opens it again will there be an explicit call to the populateFromService?
I have to see your code for that to know if populateFromService is being called or not. If you seeing features on the map after you close and open the map again, that would suggest that the call has been triggered. If not, you should not see any feature layer rendered in ManualCache mode.
>What about when the user closes the app and open it again in a later time?
When user closes app and opens, its a completely new instance of FeatureLayer and FeatureTable. So when the viewmodel is initiated and populateFromService is called, it fetches them from the service again.
Rama
Thank you Rama
I have watched your video from the Dev Summit
ArcGIS Maps SDK for Kotlin: An Introduction
Based on it I am using the Composable MapView function
with the
> My question: is this declaration of the ArcGISMap in the ViewModel enough to hold the arcGISMap state as the user pans, or zooms or when the app reconfigures?
Any compose state variable can be declared in the compose function itself or hoisted to another viewmodel. Either way the state is managed.
You still need to pass the compose state variable to the Mapview compose function.
Thanks
Rama