We have this application for UWP developed in Xamarin Forms where we display the ESRI map in different pages. The map is created from an offline vtpk file that we have on the device. Every time we land on a page with MapView control, we do the following
var mapPackageFolder = Constants.TpkFolderLocation;
var mapPackageFile = @"WebM_BaseMap_no_contour.vtpk";
var mapPackagePath = System.IO.Path.Combine(mapPackageFolder,mapPackageFile);
var tileCache = new VectorTileCache(mapPackagePath);
ArcGISVectorTiledLayer vectorTiledLayer = new ArcGISVectorTiledLayer(tileCache);
var map = new Map(new Basemap(vectorTiledLayer));
Instead of creating the map from the scratch each time, can we re-use it in different pages in the app?
Is there any standard way of doing this?