a:Drake

comprehensive geocaching solution

User Tools

Site Tools


en:mapy

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:mapy [2011/02/19 11:39] – ludekven:mapy [2026/10/12 10:16] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== Map Resources ======+====== Technical description of maps ====== 
 +Since version 6.14 a:Drake renders all maps with the [[https://github.com/mapsforge/mapsforge|Mapsforge]] library. Two kinds of maps are supported:
  
-Map resources are configurated in the map-config.xml file located in the install folder of application.+  * **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 [[en:user:vector_maps|vector map resources]].
  
-===== Localization ===== +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.
-Map-config.xml is default configuration file, you can create localized version adding language code to the file name, such as map-config-en.xml, map-config-de.xml etd. Program will try to read localized file according to selected language and if it fails, default file will be read.+
  
-===== Syntax ===== +====== Where maps are stored ====== 
-^Tag             ^^^^Description ^ +  * 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. 
-|**PocketDrake**   ||||mandatory envelope| +  * **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).
-| |**MapSource**    |||definition of the map source, used to create the combo boxu| +
-| | |**type** ||type of source +
-  MapyCz ... system of czech server na www.mapy.cz, modified UTM coordinates +
-  Google ... system of maps.google.com, uses SlippyMapTiles, identicals to Open Street Map and many others +
-| +
-| | |**name**  ||name displayed in the combo box| +
-| | |**storage** ||storage method of map tiles (since version 1.4.5) +
-  filesystem - original method, tiles are stored as separate files in filesystem (default) +
-  database - tiles are stored in database (single file) +
-| +
-| | |**MapType** ||type of map in single source, creates radiobuttons and checkboxs | +
-| | | |//mode// |attribute, defines usage (max. 3 occurences of each type) +
-  basic - map bacground - radiobutton +
-  overlay - overlay, hiking trails etc. ... - checkbox  +
-| +
-| | | |**name** |user friendly name| +
-| | | |**file** |template for file name| +
-| | | |**fileExt** |obsolete| +
-| | | |**url**  |resource url  +
-  {x} ... longitute +
-  {y} ... latitude +
-  {z} ... zoom  +
-| +
-| | | |**invertY**  || +
-| | | |**defaultZoom** |initial zoom for the first map display| +
-| | | |**minZoom** |minimal zoom (minimal detail)| +
-| | | |**maxAvailZoom** |maximal zoom available on the Internet | +
-| | | |**maxZoom** |maximal allowed zoom (maximal detail)|+
  
-You can create your own configuration file from following blocks.+====== 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 [[https://mobac.sourceforge.io/|Mobile Atlas Creator]] (MobAC). MobAC always names the file //BigPlanet_maps.sqlitedb//, rename it according to the layer setting (//File/technical name//).
  
-Procedure:+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).
  
-  - Copy map-config.xml file to PC a open it using notepad or another plain text editor (not MS Word). +^ ''<file>'' value ^ Actual file ^ 
-  - Copy configurations, you want to use. +| ''osm/mapnik'' | ''<data folder>/maps/osm/mapnik.sqlitedb'' | 
-  - Be sure, final files starts with <PocketDrake> and ends with </PocketDrake>.+| ''/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.
  
-===== Configuration for www.mapy.cz ===== +^Tag             ^^^^Description ^ 
-[[http://www.mapy.cz|www.mapy.cz]] +|**aDrake**   ||||mandatory envelope| 
- +| |**MapSource**    |||map source, shown as a map source choice in the app| 
-<code xml> +| | |**type**  ||''Google'' … Slippy Map tiles (OSM, Google, Mapy.cz and most others), URL contains ''{x}'', ''{y}'', ''{z}''\\ ''MapsForge'' … Mapsforge vector maps| 
-  <MapSource> +| | |**name**  ||display name| 
-    <type>MapyCz</type> +| | | |//language// |language of the name; used when it matches the phone language. One name without language should exist as default.| 
-    <name>Mapy CZ</name> +| | |**storage**  ||tile storage, ''database'' (one SQLite file per layer)| 
-    <MapType mode="basic"> +| | |**requestHeader**  ||optional additional HTTP request header, e.g. ''Referer''| 
-      <name>Turistická</name> +| | |**MapType**  ||map layer (any number of basic layers, max. 5 overlays per source)| 
-      <file>turist</file> +| | | |//mode// |''basic'' … base map, one is active\\ ''overlay'' … overlay (hiking trails etc.), several can be active| 
-      <url>http://m1.mapserver.mapy.cz/turist/{z}_{x}_{y}</url> +| | | |**name** |layer name| 
-      <defaultZoom>ab</defaultZoom> +| | | |**file** |raster layer: file/technical name of the database\\ vector layer: the ''.map'' file| 
-      <minZoom>3</minZoom> +| | | |**themeFile** |vector layer: ZIP archive with themes (Elevate, OpenAndroMaps …)| 
-      <maxZoom>13</maxZoom> +| | | |**themes** |list of themes found in the ZIP, attribute //selected// = index of the selected theme (filled in by the app)| 
-    </MapType> +| | | |**theme** |vector layer: older way – path to a single XML theme| 
-    <MapType mode="basic"> +| | | |**url** |tile URL; ''{x}'', ''{y}'' = tile coordinates, ''{z}'' = zoom, ''{s}'' = subdomain character. Empty URL = off-line map.| 
-      <name>Základní</name> +| | | |**subdomain** |characters substituted for ''{s}'' (e.g. ''abc'' or ''0123'')| 
-      <file>base-n</file> +| | | |**invertY** |''true'' for sources with inverted Y axis (TMS)| 
-      <url>http://m1.mapserver.mapy.cz/base-n/{z}_{x}_{y}</url> +| | | |**defaultZoom** |initial zoom when the map is opened for the first time| 
-      <defaultZoom>12</defaultZoom> +| | | |**minZoom** |minimum zoom| 
-      <minZoom>3</minZoom> +| | | |**maxAvailZoom** |maximum zoom available for download| 
-      <maxZoom>16</maxZoom> +| | | |**maxZoom** |maximum zoom|
-    </MapType> +
-    <MapType mode="basic"> +
-      <name>Ortofoto</name> +
-      <file>ophoto</file> +
-      <url>http://m1.mapserver.mapy.cz/ophoto/{z}_{x}_{y}</url> +
-      <defaultZoom>12</defaultZoom> +
-      <minZoom>3</minZoom> +
-      <maxZoom>17</maxZoom> +
-    </MapType> +
-    <MapType mode="overlay"> +
-      <name>Turistické trasy</name> +
-      <file>ttur</file> +
-      <url>http://m1.mapserver.mapy.cz/ttur/{z}_{x}_{y}</url> +
-      <defaultZoom>12</defaultZoom> +
-      <minZoom>3</minZoom> +
-      <maxZoom>13</maxZoom> +
-    </MapType> +
-    <MapType mode="overlay"> +
-      <name>Cyklotrasy</name> +
-      <file>tcyklo</file> +
-      <url>http://m1.mapserver.mapy.cz/tcyklo/{z}_{x}_{y}</url> +
-      <defaultZoom>12</defaultZoom> +
-      <minZoom>3</minZoom> +
-      <maxZoom>13</maxZoom> +
-    </MapType> +
-  </MapSource> +
-</code> +
- +
-===== Configuration forGoogle Maps ===== +
-[[http://maps.google.com|Google Maps]] +
- +
-<code xml> +
-  <MapSource> +
-    <type>Google</type> +
-    <name>Google Maps</name> +
-    <MapType mode="basic"> +
-      <name>Základní</name> +
-      <file>google\map</file> +
-      <url>http://mt0.google.com/vt/x={x}&y={y}&z={z}</url> +
-      <defaultZoom>14</defaultZoom> +
-      <minZoom>1</minZoom> +
-      <maxZoom>18</maxZoom> +
-    </MapType> +
-    <MapType mode="basic"> +
-      <name>Satelitní</name> +
-      <file>google\sat</file> +
-      <url>http://khm1.google.com/kh/v=63&x={x}&y={y}&z={z}</url> +
-      <defaultZoom>14</defaultZoom> +
-      <minZoom>1</minZoom> +
-      <maxZoom>18</maxZoom> +
-    </MapType> +
-    <MapType mode="basic"> +
-      <name>Terénní</name> +
-      <file>google\terr</file> +
-      <url>http://mt0.google.com/vt/lyrs=t@126,r@142&hl=cs&x={x}&y={y}&z={z}</url> +
-      <defaultZoom>14</defaultZoom> +
-      <minZoom>1</minZoom> +
-      <maxZoom>18</maxZoom> +
-    </MapType> +
-  </MapSource> +
-  </code> +
- +
-===== Configuration forMyTopo (pouze USA) ===== +
-[[http://www.mytopo.com/maps/|MyTopo (pouze USA)]] +
-<code xml> +
-  <MapSource> +
-    <type>Google</type> +
-    <name>MyTopo (pouze USA)</name> +
-    <MapType mode="basic"> +
-      <name>Základní</name> +
-      <file>mytopo</file> +
-      <url> +
-        http://maps.mytopo.com/groundspeak/tilecache.py/1.0.0/topoG/{z}/{x}/{y}.png +
-      </url> +
-      <defaultZoom>14</defaultZoom> +
-      <minZoom>1</minZoom> +
-      <maxZoom>18</maxZoom> +
-    </MapType> +
-  </MapSource> +
-</code> +
- +
-===== Configuration forOpen Street Maps ===== +
-[[http://www.openstreetmap.org/|Open Street Maps]] +
-<code xml> +
-  <MapSource> +
-    <type>Google</type> +
-    <name>Open Street Map</name> +
-    <MapType mode="basic"> +
-      <name>Základní</name> +
-      <file>osm</file> +
-      <url>http://a.tile.openstreetmap.org/{z}/{x}/{y}.png</url> +
-      <defaultZoom>14</defaultZoom> +
-      <minZoom>1</minZoom> +
-      <maxZoom>18</maxZoom> +
-    </MapType> +
-  </MapSource> +
-</code> +
- +
-===== Configuration forCykloatlas ===== +
-[[http://www.cykloserver.cz/cykloatlas/|Cykloatlas]] +
-<code xml> +
-  <MapSource> +
-    <type>Google</type> +
-    <name>Cykloatlas</name> +
-    <MapType mode="basic"> +
-      <name>Základní</name> +
-      <file>cykloatlas</file> +
-      <url>http://services.tmapserver.cz/tiles/gm/shc/{z}c/{x}/{y}.png</url> +
-      <defaultZoom>14</defaultZoom> +
-      <minZoom>1</minZoom> +
-      <maxZoom>18</maxZoom> +
-    </MapType> +
-  </MapSource> +
-</code> +
- +
-===== Configuration forFreemap Slovakia ===== +
-[[http://www.freemap.sk/|Freemap Slovakia]] +
-<code xml> +
-  <MapSource> +
-    <type>Google</type> +
-    <name>Freemap Slovakia</name> +
-    <MapType mode="basic"> +
-      <name>Základní</name> +
-      <file>FMSlovakia</file> +
-      <url>http://www.freemap.sk/layers/allinone/?/BN/{z}/{x}/{y}</url> +
-      <defaultZoom>14</defaultZoom> +
-      <minZoom>1</minZoom> +
-      <maxZoom>18</maxZoom> +
-    </MapType> +
-  </MapSource> +
-</code> +
- +
-===== Configuration forOvi Nokia ===== +
-[[http://maps.ovi.com/]] +
- +
-<code xml> +
-  <MapSource> +
-    <type>Google</type> +
-    <name>Ovi Nokia</name> +
-    <MapType mode="basic"> +
-      <name>Basic</name> +
-      <file>ovi</file> +
-      <url>http://maptile.maps.svc.ovi.com/maptiler/maptile/newest/normal.day/{z}/{x}/{y}/256/png8</url> +
-      <defaultZoom>12</defaultZoom> +
-      <minZoom>1</minZoom> +
-      <maxZoom>17</maxZoom> +
-    </MapType> +
-  </MapSource> +
-</code> +
-   +
-===== Configuration forOutdoorActive DE (německé turistické mapy) ===== +
-[[http://www.outdooractive.com]]+
  
-<code xml> +Please respect the terms of use of on-line map providers.
-  <MapSource> +
-    <type>Google</type> +
-    <name>OutdoorActive DE</name> +
-    <MapType mode="basic"> +
-      <name>Basic</name> +
-      <file>outdooractive</file> +
-      <url>http://t0.outdooractive.com/portal/map/{z}/{x}/{y}.png</url> +
-      <defaultZoom>12</defaultZoom> +
-      <minZoom>8</minZoom> +
-      <maxZoom>16</maxZoom> +
-    </MapType> +
-  </MapSource> +
-</code>+
  
en/mapy.1298111981.txt.gz · Last modified: (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki