User Tools

Site Tools


manual:advanced:customization:actions

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
manual:advanced:customization:actions [2015/09/03 16:56] mstupkamanual:advanced:customization:actions [2015/10/23 10:15] (current) mstupka
Line 1: Line 1:
 ====== Locus Actions ====== ====== Locus Actions ======
  
-This mysterious name hides a very simple way of providing an easy method of downloading data from your own web server to Locus Map (and probably other features will come later). The whole concept is based on XML file that you provide to Locus for processing. The XML file describes what to do.+This mysterious name hides a very simple way of providing an easy method of downloading data from your own web server to Locus Map (and probably other features will come later). The whole concept is based on XML file that you provide to Locus Map for processing. The XML file describes what to do.
  
 Locus Map currently supports only one action: **download** Locus Map currently supports only one action: **download**
-<todo> pokračovat : </todo> 
 ===== How to ===== ===== How to =====
  
-Whole file you provide to Locus is XML file with this syntax+Whole file you provide to Locus is an XML file with this syntax:
  
-  <?xml version="1.0" encoding="utf-8"?> +<code> 
-  <locusActions> +<?xml version="1.0" encoding="utf-8"?> 
-    <action>...</action> +<locusActions> 
-  </locusActions>+  <action>...</action> 
 +</locusActions
 +</code>
  
-Where //locusActions// may contain one or more //action// objectsthat will do required work.+Where //locusActions// may contain one or more //action// objects that will do the required work.
  
-To make Locus correctly handling this file, you simply construct URL to this file by following syntax (example)+To make Locus Map handle this file correctly, simply construct URL to this file by following syntax (example):
  
-  locus-actions://https/dl.dropbox.com/u/12579512/my_directory/test.xml+<code> 
 +locus-actions://https/dl.dropbox.com/u/12579512/my_directory/test.xml 
 +</code>
  
-As you can see, simply change scheme to **locus-actions** and default scheme change to part of base URL separated only by one slash. Locus will handle this link in simple way: +As you can see, change simply the scheme to **locus-actions** and the default scheme changes to part of base URL separated only by one slash. Locus Map will handle this link in simple way: 
-  - remove **locus-actions** tag + 
-  - change first part into new scheme+  - removes **locus-actions**  tag 
 +  - changes first part into new scheme
  
 ==== Download ==== ==== Download ====
  
-Action object that serve to download files into Locus directory+Action object that serves downloading files into Locus directory.
  
-Sample syntax is +Sample syntax is:
  
-  <?xml version="1.0" encoding="utf-8"?> +<code> 
-  <locusActions> +<?xml version="1.0" encoding="utf-8"?> 
-    <download> +<locusActions> 
-      <source size="22075830" date="2012-06-29_19-11-54"> +  <download> 
-        <![CDATA[http://.../map.tar]]> +    <source size="22075830" date="2012-06-29_19-11-54"> 
-      </source> +      <![CDATA[http://.../map.tar]]> 
-      <dest><![CDATA[/maps/map.tar]]></dest> +    </source> 
-      <after>...</after> +    <dest><![CDATA[/maps/map.tar]]></dest> 
-    </download> +    <after>...</after> 
-  </locusActions>+  </download> 
 +</locusActions
 +</code>
  
 __Where__ __Where__
-  * **download** - is core tagthat identify this action + 
-  * **source** - URL to source file. If contain **size** and **date** parameters, download file be checked and not downloaded if already exists +  * **download**  core tag that identifies this action 
-    * **size** - (optional) size of file in bytes +  * **source**  - URL to source file. If it contains **size**  and **date**  parameters, download file will be checked and not downloaded if it already exists. 
-    * **date** - (optional) date of last edit in format //yyyy-MM-dd_HH-mm-ss//. Some phones have problems with setting correct time to downloaded file. Highly recommended is to set only **size** for comparing already downloaded files, +      * **size**  - (optional) size of the file in bytes 
-  * **dest** - relative path (to Locus root)where to put new file +      * **date**  - (optional) date of the last edit of format //yyyy-MM-dd_HH-mm-ss//. Some phones have problems with setting correct time to the downloaded file. Highly recommended is to set only **size**  for comparing already downloaded files. 
-  * **after** - special action that is performed after download. Currently supported is +  * **dest** - alternate path (to Locus root) where to put the new file 
-    * **refreshMap** - useful if you download new personal or vector maps. This called on last map (in case you download more maps), refresh list of maps without need to restart Locus +  * **after** - special action that is performed after download. Currently is supported: 
-    * **importData** - immediately after file is downloadedLocus will start normal import process of this file +      * **refreshMap**  - useful if you download new personal or vector map. This calls on the last map (in case you download more maps) and refreshes the list of maps without need to restart Locus 
-    * **displayData** - immediately after downloadLocus will load and display downloaded file on map. Data will be displayed only temporarily, so if you want to store them permanently, use //importData// option +      * **importData**  - immediately after the file is downloaded Locus Map starts common import process of this file 
-    * **extract** - extract downloaded file. Directory is the one, used for download. +      * **displayData**  - immediately after download Locus Map loads and displays downloaded file on map. Data will be displayed only temporarily, so if you want to store them permanently, use //importData// option instead 
-    * **deleteSource** - allow to delete downloaded file. This is useful mainly if you download zipped file and after extract, you want to remove this file.+      * **extract**  extracts downloaded file. Directory is the same as for download. 
 +      * **deleteSource**  allows to delete the downloaded file. This is useful mainly if you download zipped file and after extracting it you want to remove it.
  
 __TIPS__ __TIPS__
-  * **Download map file (zip archive)** - you may use this combination **extract|deleteSource|refreshMap**, which extract file after download, delete original file and finally refresh maps list. + 
-  * **Download file ready for import (zip archive)** - you may use this combination **extract|importData**, which extract file after download and start import. In this case, it is suggested to set **dest** parameter to special Locus directory **cache/temp**. This directory is from time to time cleared, so all unneeded files will be removed.+  * **Download map file (zip archive)**  - you may use this combination **extract|deleteSource|refreshMap**, which extracts the file after download, deletes original file and finally refreshes the maps list. 
 +  * **Download file ready for import (zip archive)**  - you may use this combination **extract|importData**, which extracts the file after download and starts import. In this case, it is suggested to set **dest**  parameter to special Locus Map directory **cache/temp**. This directory is cleared from time to time so all unneeded files are removed. 
manual/advanced/customization/actions.1441292161.txt.gz · Last modified: 2015/09/03 16:56 (external edit)