Offline Basemap Solutions for ArcGIS Mobile Clients

In mobile GIS applications, data is typically categorized into two primary types: basemap layers and operational layers. Basemap layers serve as reference frameworks for navigation and orientation, containing relatively static visual elements. Operational layers, on the other hand, store dynamic GIS data that supports spatial queries, attribute searches, and editing capabilities with server synchronization.

ArcGIS Mobile Product Landscape

ArcGIS offers multiple mobile solutions with varying approaches to offline functionality. The Windows Mobile-based ArcPad and ArcGIS Mobile represent mature platforms with dedicated offline cache formats. Since version 10, ArcGIS Mobile has supported reading cached map service tiles from ArcGIS Server in both exploded and compact formats.

The newer ArcGIS for iOS, Android, and Windows Phone platforms follow a different approach, relying on ArcGIS Server REST services for most operations including map display. While offline functionality is planned for these platforms, specific release timelines remain undefined.

Offline Basemap Solutions for Modern ArcGIS Mobile Clients

This article presents three practical appproaches for implementing offline basemap layers in ArcGIS for iOS, Android, and Windows Phone applications, using Windows Phone as our reference platform.

Solution 1: Exploded Format Cache Files from ArcGIS Server

The ArcGIS API for Windows Phone provides the ArcGISTiledMapServiceLayer class for loading cached map services published through ArcGIS Server. This component calculates required tile parameters (row, column, level) and utilizes the GetTileUrl method to construct complete tile URLs.

Developers can create custom layers by inheriting from TiledMapServiceLayer or TiledLayer to load various map sources including Google Maps and Tianditu. For loading local cache files, the GetTileSource method offers a more direct approach than GetTileUrl, as it accepts an ImageSource parameter in its onComplete callback.

To implement this solution, first copy the exploded format cache files to the device, including configuration files (conf.cdi and conf.xml) that define the cache's full extent. These files enable dynamic generation of the Tiling Scheme during layer initialization. The following demonstrates a custom implementation:

protected override void LoadTileSource(int zoomLevel, int tileRow, int tileColumn, Action<ImageSource> completionCallback)
{
    string fileExtension = string.Empty;
    if (_tileFormat.ToLower().Contains("png"))
        fileExtension = ".png";
    else if (_tileFormat.ToLower().Contains("jpeg") || _tileFormat.ToLower().Contains("jpg"))
        fileExtension = ".jpg";
    else
        throw new Exception("Unsupported tile format: " + _tileFormat);
    
    if (_storageFormat == StorageMode.Exploded)
    {
        string basePath = _cachePath;
        basePath += @"/_alllayers";
        
        string level = zoomLevel.ToString().PadLeft(2, '0');
        string row = String.Format("{0:X}", tileRow).PadLeft(8, '0');
        string column = String.Format("{0:X}", tileColumn).PadLeft(8, '0');
        
        string tilePath = basePath + @"/L" + level + @"/R" + row + @"/C" + column + fileExtension;
        
        var bitmapImage = new BitmapImage(new Uri(tilePath, UriKind.RelativeOrAbsolute))
        {
            CreateOptions = BitmapCreateOptions.DelayCreation
        };
        
        bitmapImage.ImageFailed += (sender, args) =>
        {
            string fallbackPath = _cachePath + "/missing" + _rowCount + fileExtension;
            var fallbackImage = new BitmapImage(new Uri(fallbackPath, UriKind.RelativeOrAbsolute))
            {
                CreateOptions = BitmapCreateOptions.DelayCreation
            };
            completionCallback(fallbackImage);
        };
        
        completionCallback(bitmapImage);
    }
}

When a specific tile file is unavailable (perhaps not yet generated), a predefined placeholder image can be loaded as a substitute.

Solution 2: Compact Format Cache Files from ArcGIS Server

The compact format, introduced with ArcGIS Server 10, stores tile images in .bundle files, each containing up to 128×128 tiles. This format reduces file count and facilitates easier data migration. While official documentation doesn't provide details for reading this format, reverse engineering has revealed its structure.

Similar to the exploded format, copy the cache files to the device and use configuration files to establish the tiling scheme. The implementation follows a similar pattern to the exploded format but requires different file access logic to read from bundle files rather than individual tile files.

Solution 3: Third-Party Offline Map Files

Beyond ArcGIS Server caches, developers can utilize third-party offline map files as basemaps. Tools like Mobile Atlas Creator generate various offline map formats, with SQLite databases being a common choice due to their cross-platform support and efficiency.

For example, RMaps and OruxMaps both use SQLite for storing offline maps. Let's examine the RMaps format:

  1. Create an RMaps offline map file
  2. Examine the database structure using SQLite Manager
  3. Identify that tile information is stored in a 'tiles' table with columns corresponding to x, y, and z values
  4. Determine the relationship: level = 17-z

While Windows Phone doesn't natively support SQLite, several third-party libraries are available. Using Sqlite Client for Windows Phone, we can read RMaps map files. The following demonstrates the integration of RMaps offline maps (Bing Maps) with ArcGIS Online StreetMap:

It's important to note that formats like RMaps and OruxMaps typically don't include tiling scheme parameters in the database. While this limits the ability to define properties like FullExtent, it doesn't prevent usage by specifying the display extent directly in the Map control. Most map sources use standard spatial references such as 102100 or 3857.

This approach enables custom basemap creation without ArcGIS Server software. Pre-created RMaps format files for various cities are available from online sources.

Compared to specialized offline map applications, ArcGIS mobile products offer advantages including flexible map data layering, GraphicsLayer support, and robust server-side functionality. Combined with the native SDK capabilities of platforms like Windows Phone, developers can create comprehensive navigation applications.

Packaging Offline Map Files

Consider these deployment strategies for offline map files:

  • Build Action Selection: In Silverlight applications, the Build Action determines file location. Selecting "Resource" embeds files in the DLL, while "Content" places them outside the DLL but within the XAP file. All three solutions support either approach.
  • IsolatedStorage: Files can be copied to the application's IsolatedStorage if needed.
  • Performance Consideration: For exploded caches, setting media files' Build Action to "Content" yields better performance.
  • Compression: Exploded caches can be packaged as .zip files for easier deployment, with decompression occurring during application loading.

The solutions presented here, demonstrated with ArcGIS for Windows Phone, are equally applicable to ArcGIS for iOS and Android platforms.

Tags: ArcGIS Mobile GIS Offline Mapping Windows Phone Android

Posted on Mon, 18 May 2026 05:26:16 +0000 by php_guy