× You are viewing the Gaia GPS Classic Help Center. For the latest information, please visit the new help center at help.gaiagps.com.
Follow

How Do Maps Work In Gaia GPS?

This article is a somewhat technical overview of how maps and map downloads work in Gaia GPS. Gaia GPS supports viewing multiple map types, both online and offline.

What Type of Maps Are We Talking About?


Maps in Gaia GPS come from a number of providers, and we also make some maps in-house.

Most of the maps in Gaia GPS are "raster" maps cut into "tiles". Raster means the map is made of pre-made images, often different images for different zoom levels. Tiled means the map is cut into many small squares (for performance reasons).

Map Sources


There are several pieces of information that go into defining a map source:

  • Minimum and maximum zoom levels that the map provides
  • A bounding box for the region the map covers (defined by the Northeast and Southwest corners of a box that contains the entire map)
  • A URL where the tile lives on the internet
  • A name and description
  • A unique identifier used in the App

How Map Downloads Are Stored


Maps in Gaia GPS are stored in two different places: the temporary cache folder and the My Files Folder. Each Map Source has its own download folder and temporary cache folder. It's important that each Map Source has exactly one download folder. Multiple copies of the same tile are never stored in the My Files Folder. As you browse the map, Gaia GPS first checks if a tile is available in the My Files Folder, then the temporary cache. If the tile is not available in either of those places, the app requests it from the internet. If the tile is successfully fetched from the internet it is stored in the temporary cache.

The temporary cache can grow quite large when panning around the map. It can be manually cleared from the app's Settings menu if you are running low on storage. When the app is launched, it checks if the temporary cache contains more than 100,000 tiles. If it does, the 10,000 least recently used tiles are deleted.

Map Downloads


Gaia GPS supports downloading maps for offline use . Areas of the map that are frequently browsed will likely be in the temporary cache, but in order to guarantee that maps will be available offline they should be downloaded.

Each map download record contains several pieces of information:
  • The map source the download refers to; The minimum zoom level to be downloaded; The maxium zoom level to be downloaded; The northeast and southwest corners of the region to be downloaded
  • The number of tiles remaining to download
  • A name, date, and description for the download
Maps are downloaded by selecting a rectangular region on the map, and choosing one or more map sources to downloaded. When the download is saved, a Map Download record is created for each Map Source selected. The Map Download record is then sent to the Map Downloader. The downloader calculates a list of all tiles within the selected region and iterates through them. If a tile does not already exist in the My Files folder, it is downloaded. The number of tiles remaining to be downloaded is updated as this happens. If you download a Map Source for a region, then select the same Map Source and region to download again no files will actually be downloaded, because they are already all stored on the device, but the app will still have to go through the list of all tiles for the map and check if they have been downloaded.

When a Map Download is deleted, a similar process happens as when it was downloaded. A list of tiles is generated, then each tile on the list is checked to see if any other Map Downloads need it, and if they don't it is deleted. If you have two downloads from the same Map Source and region, and delete one of them, no tiles will actually be deleted. When the remaining download is deleted all the tiles will be deleted.

Auto Resuming Downloads


One of the options in the Map Downloads section of the Settings menu is "Auto Resume". With this enabled, the app will check for incomplete downloads at launch, and resume them. Only map downloads that were created on the device will be auto-resumed. Downloads received by GaiaGPS.com sync will never be auto-resumed, they must be manually resumed.

 

 
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.