AnsweredAssumed Answered

Navigating between pages with Maps

Question asked by mikehamsa on Dec 26, 2014
Latest reply on Feb 2, 2015 by mnielsen-esristaff

Hello,

 

I'm working on a universal app with multiple pages; with the main page containing the MapView. Right now I'm focusing on Windows Phone and I'm having some trouble with the page navigation. When I enable NavigationCacheMode on the main page and that page gets navitaged to from another page, the MapView and the Map on the main page are completely unresponsive.

 

I did a little more testing with a very simple Windows Phone app (universal). I started with the ArcGIS Runtime 10.2.4 for .NET App (Universal App)  template that defines an app with a single page which contains a MapView, a Map and a single basemap layer.  I added a second page - a blank page - and added a list view with basemap layers from ArcGIS Portal . When the use picks a basemap, the app navigates back to the main page and replaces the basemap layer in the map. But when NavigationCacheMode is enabled or required the MapView and the Map are no longer responsive.

 

Also, I'm not using the NavigationHelper classes added with the Basic page.

 

When NavigationCacheMode is disabled, the main page obviously gets reconstructed when it is navigated to so everything is back to its original state. And even this seems to be unreliable. I built a small class to save off some of the map state when the main page is navigated from and then use it to restore the map state when the main page is navigated back to and this only works a few times before the app eventually crashes.

 

I noticed that most of the samples I've seen only contain a single page - is this by design?

 

 

Am I doing this correctly, and if so, are there any known issues with the NavigationCacheMode. Enabling NavigationCacheMode seems to be the correct way of doing this but the runtime doesn't seem to react well with it enabled.

 

Any suggestions?

 

Thanks in advance,

mike...

Outcomes