This is an old revision of the document!
Table of Contents
Map Resources
Map resources are configurated in the map-config.xml file located in the install folder of application.
Localization
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
Tag | Description | |||
---|---|---|---|---|
PocketDrake | mandatory envelope | |||
MapSource | definition of the map source, used to create the combo boxu | |||
type | type of sourceMapyCz ... 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.
Procedure:
- Copy map-config.xml file to PC a open it using notepad or another plain text editor (not MS Word).
- Copy configurations, you want to use.
- Be sure, final files starts with <PocketDrake> and ends with </PocketDrake>.
Configuration for www.mapy.cz
<MapSource> <type>MapyCz</type> <name>Mapy CZ</name> <MapType mode="basic"> <name>Turistická</name> <file>turist</file> <url>http://m1.mapserver.mapy.cz/turist/{z}_{x}_{y}</url> <defaultZoom>ab</defaultZoom> <minZoom>3</minZoom> <maxZoom>13</maxZoom> </MapType> <MapType mode="basic"> <name>Základní</name> <file>base-n</file> <url>http://m1.mapserver.mapy.cz/base-n/{z}_{x}_{y}</url> <defaultZoom>12</defaultZoom> <minZoom>3</minZoom> <maxZoom>16</maxZoom> </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>
Configuration forGoogle Maps
<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>
Configuration forMyTopo (pouze USA)
<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>
Configuration forOpen Street Maps
<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>
Configuration forCykloatlas
<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>
Configuration forFreemap Slovakia
<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>
Configuration forOvi Nokia
<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>
Configuration forOutdoorActive DE (německé turistické mapy)
<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>