a:Drake

comprehensive geocaching solution

User Tools

Site Tools


en:mapy

Technical description of maps

Since version 6.14 a:Drake renders all maps with the Mapsforge library. Two kinds of maps are supported:

  • raster (tile) maps – the map consists of 256×256 pixel images (tiles). Tiles are downloaded from the internet (OpenStreetMap, Mapy.cz, Google, custom source) and saved automatically for off-line use. A prepared off-line map can be used as well.
  • Mapsforge vector maps – a .map file describing map objects, rendered on the phone according to the selected theme. They need much less space for large areas. See vector map resources.

Maps are configured in Settings → Maps → Edit map configuration. Changes are stored in map-config.xml (see below); there is no need to edit it by hand.

Where maps are stored

  • The data folder is selected in Settings (Internal (device), External (SD card) or Other). By default it is the app's private folder, e.g. /storage/emulated/0/Android/data/cz.adrake/files. It contains the database, map-config.xml and the maps subfolder with raster tiles.
  • Vector maps and themes are selected with the system file picker (Storage Access Framework) since 6.14. Files can be stored anywhere on the device or SD card (e.g. Download or Documents); copying them to the data folder is not necessary. a:Drake remembers the access permission and asks again if it is lost (e.g. after the file was moved).

Raster maps

Each raster layer has its own SQLite database with the .sqlitedb extension (table tiles with columns x, y, z, s, image and table info with the zoom range). The format matches RMaps/BigPlanet SQLite, also used by Locus and produced by Mobile Atlas Creator (MobAC). MobAC always names the file BigPlanet_maps.sqlitedb, rename it according to the layer setting (File/technical name).

A layer with an empty URL is an off-line map – nothing is downloaded, tiles are only read from the database (marked (offline) in the map list).

<file> value Actual file
osm/mapnik <data folder>/maps/osm/mapnik.sqlitedb
/storage/emulated/0/Locus/mapsOnline/map.sqlitedb absolute path including extension
content://… file selected with the system file picker

:!: If storage or file of an existing layer is changed, existing tiles are NOT converted.

map-config.xml

map-config.xml is stored in the data folder. A default version (OpenStreetMap, Google Maps, Mapy.cz and Mapsforge vector maps) is created on first start. If the file is broken, a:Drake renames it to .bak and creates a new default one.

Tag Description
aDrake mandatory envelope
MapSource map source, shown as a map source choice in the app
type Google … Slippy Map tiles (OSM, Google, Mapy.cz and most others), URL contains {x}, {y}, {z}
MapsForge … Mapsforge vector maps
name display name
language language of the name; used when it matches the phone language. One name without language should exist as default.
storage tile storage, database (one SQLite file per layer)
requestHeader optional additional HTTP request header, e.g. Referer
MapType map layer (any number of basic layers, max. 5 overlays per source)
mode basic … base map, one is active
overlay … overlay (hiking trails etc.), several can be active
name layer name
file raster layer: file/technical name of the database
vector layer: the .map file
themeFile vector layer: ZIP archive with themes (Elevate, OpenAndroMaps …)
themes list of themes found in the ZIP, attribute selected = index of the selected theme (filled in by the app)
theme vector layer: older way – path to a single XML theme
url tile URL; {x}, {y} = tile coordinates, {z} = zoom, {s} = subdomain character. Empty URL = off-line map.
subdomain characters substituted for {s} (e.g. abc or 0123)
invertY true for sources with inverted Y axis (TMS)
defaultZoom initial zoom when the map is opened for the first time
minZoom minimum zoom
maxAvailZoom maximum zoom available for download
maxZoom maximum zoom

Please respect the terms of use of on-line map providers.

en/mapy.txt · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki