Select to view content in your preferred language

Loading basemap in offline mode xamarin forms

05-28-2020 01:23 AM
New Contributor II

Hello Team,

I am using ArcGIS for map integration of my Xamarin forms appliction.

Till now, I have integrated the map features, Overlay operational and graphics layer over my map using the nuget package "Esri.ArcGISRuntime.Xamarin.Forms(100.7.0)" NuGet package.I am using ArcGIS default Basemap ( Basemap.CreateNavigationVector()) and overlayed my KML/KMZ files over it.

But now I have a requirement to load map in offline mode as well. I am able to save the KML/KMZ and other overlay files in my app local folder and overlay it. However, I am stuck in loading the offline Basemap.

I have been through this link "Generate offline map with local basemap | ArcGIS for Developers " and couple of other links as well, but I am completely lost

I haven't authored any map on ArcGIS web portal till now, so can you please guide me on how can I use Load my BaseMap in offline mode as well. It is a little urgent. Looking forward to your response.

0 Kudos
1 Reply
Esri Contributor

Sorry to hear you're having trouble with taking basemaps offline. I recommend taking a look at Export tiles | ArcGIS for Developers  , which doesn't require publishing the map to ArcGIS Online.

It sounds like you'll want something like the following process for your app:

  1. Define the map you need in code - basemap, KML layers, etc.
  2. Define the map area you want to take offline
  3. Use the export tiles task to take the basemap offline
  4. Save any additional content you need to the local device.

And then when loading the offline map, you'll want to

  1. Create the map and create a basemap from the tile cache. Edit and sync features | ArcGIS for Developers  happens to show loading a basemap from a tile cache.
  2. Open the saved KML and any additional content

Note that you'll want to pay attention to the performance characteristics of the exported tiles; the performance differences can be counterintuitive when comparing vector and raster tiles, especially when dealing with small export extents.

0 Kudos