Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Collapse]Map Control
   [Expand]Getting Started
    Layers
   [Expand]Coordinate Systems
   [Expand]Map Image Data
   [Expand]GIS Data
   [Expand]Vector Data
   [Expand]Visual Elements
   [Collapse]Examples
    [Expand]General
    [Collapse]Map Image Data
      How to: Load Image Tiles from Bing Maps
      How to: Load Image Tiles from OpenStreetMap
      How to: Load Image Tiles from a Local Directory
      How to: Cache Image Tiles Locally
      How to: Show Image Tiles Loading Progress from the Web Data Service
      How to: Obtain Data from a Web Map Service
      How to: Obtain a Collection of Available Layers in the ResponseCapabilities Event Handler
    [Expand]GIS Data
    [Expand]Vector Data
    [Expand]Printing and Exporting
   [Expand]End-User Features
   [Expand]Product Information
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Cache Image Tiles Locally

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E5071.

This example illustrates what is required to customize the local cache of a map control.

The local cache allows you to save internet resources and significantly increase map performance by loading saved map tiles from the local directory.

To enable map cache, specify the directory to which the loaded map tiles will be saved using the CacheOptions.DiskFolder property and the time interval after which the loaded map tiles should be updated using the CacheOptions.DiskExpireTime property. To access the CacheOptions object, use the MapDataProviderBase.CacheOptions property.

In addition, you can specify the amount of memory on the computer and disk space (in megabytes) for storing tile images via CacheOptions.MemoryLimit and CacheOptions.DiskLimit properties, respectively.

In this example tile images of a map are loaded from the OpenStreetMap resource.

How would you rate this topic?​​​​​​​