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/07 11:24] mstupkamanual:advanced:customization:actions [2025/11/19 20:35] (current) – [Event] menion
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 Map 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 an XML file that you provide to Locus Map for processing. The XML file describes what to do. 
 + 
 +Locus Map currently supports only these actions: 
 +  * **download** 
 +  * **event**
  
-Locus Map currently supports only one action: **download** <todo> pokračovat : </todo> 
 ===== How to ===== ===== How to =====
  
-Whole file you provide to Locus is an XML file with this syntax:+The whole file you provide to Locus is an XML file with this syntax:
  
 <code> <code>
Line 15: Line 18:
 </code> </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 Map handle this file correctly, simply construct URL to this file by following syntax (example):+To make Locus Map handle this file correctly, simply construct URL to this file with the following syntax (example):
  
 <code> <code>
Line 23: Line 26:
 </code> </code>
  
-As you can see, simply change the scheme to **locus-actions** and the default scheme changes to part of base URL separated only by one slash. Locus will handle this link in simple way:+As you can see, changing simply the scheme to **locus-actions** and the default scheme changes to part of the base URL separated only by one slash. Locus Map will simply handle this link:
  
   - removes **locus-actions**  tag   - removes **locus-actions**  tag
-  - changes first part into new scheme+  - changes the first part into new scheme
  
 ==== Download ==== ==== Download ====
  
-Action object that serves downloading files into Locus directory.+An action object that serves downloading files into the Locus directory.
  
 Sample syntax is: Sample syntax is:
Line 49: Line 52:
 __Where__ __Where__
  
-  * **download**  - a core tagthat identifies this action +  * **download**  - a core tag that identifies this action 
-  * **source**  - URL to source file. If it contains **size**  and **date**  parameters, download file will be checked and not downloaded if it already exists+  * **source**  - URL to source file. If it contains **size**  and **date**  parameters, the download file will be checked and not downloaded if it already exists.
       * **size**  - (optional) size of the file in bytes       * **size**  - (optional) size of the file in bytes
-      * **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 +      * **date**  - (optional) date of the last edit of format //yyyy-MM-dd_HH-mm-ss//. Some phones have problems with setting the correct time for the downloaded file. It is highly recommended to set only **size**  for comparing already downloaded files. 
-  * **dest** - alternate path (to Locus root)where to put the new file +  * **dest** - alternate path (to Locus root) where to put the new file 
-  * **after** - special action that is performed after download. Currently is supported +  * **after** - special action that is performed after download. Currently supported: 
-      * **refreshMap**  - useful if you download a new personal or vector maps. This calls on the last map (in case you download more maps) and refreshes list of maps without need to restart Locus +      * **refreshMap**  - useful if you download a new personal or vector map. This calls on the last map (in case you download more maps) and refreshes the list of maps without the need to restart Locus 
-      * **importData**  - immediately after the file is downloaded Locus Map starts common import process of this file +      * **importData**  - immediately after the file is downloadedLocus Map starts the common import process of this file 
-      * **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 +      * **displayData**  - immediately after downloadLocus Map loads and displays the downloaded file on the map. Data will be displayed only temporarily, so if you want to store it permanently, use //importData// option instead 
-      * **extract**  - extracts downloaded file. Directory is the same as for download. +      * **extract**  - extracts downloaded file. The 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.+      * **deleteSource**  - allows deletion of the downloaded file. This is useful mainly if you download zipped fileand after extracting ityou want to remove it.
  
 __TIPS__ __TIPS__
  
-  * **Download map file (zip archive)**  - you may use this combination **extract|deleteSource|refreshMap**, which extracts file after download, deletes original file and finally refreshes the maps list. +  * **Download map file (zip archive)**  - you may use this combination **extract|deleteSource|refreshMap**, which extracts the file after download, deletes the original fileand finally refreshes the maps list. 
-  * **Download file ready for import (zip archive)**  - you may use this combination **extract|importData**, which extracts 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.+  * **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 the **dest**  parameter to the special Locus Map directory **cache/temp**. This directory is cleared from time to timeso all unneeded files are removed. 
 + 
 +==== Event==== 
 + 
 +An action that triggers a certain action. 
 + 
 +Sample syntax is: 
 + 
 +<code> 
 +<?xml version="1.0" encoding="utf-8"?> 
 +<locusActions> 
 +  <event> 
 +    <key>setMapVector</key> 
 +    <value><![CDATA[ /mapsVector/DownloadedMap.map ]]></value> 
 +  </event> 
 +</locusActions> 
 +</code> 
 + 
 +__Where__
  
 +  * **key**  - one of predefined types
 +      * __setMapVector__  - set a certain map file
 +      * __setMapVectorTheme__  - set a certain map theme
 +  * **value** - relative path to map or theme
manual/advanced/customization/actions.1441617896.txt.gz · Last modified: (external edit)