Locus action is a very simple way of providing an easy method of downloading data from your own web server or claud to Locus GIS. The whole concept is based on XML file that you provide to Locus GIS for processing. 

How to


  • Create a special XML file with a definition web link for downloading and location (path) where to store the new file (see example below):
<?xml version="1.0" encoding="utf-8"?>
<locusActions>
  <action>...</action>
</locusActions>
  • To make Locus GIS handle this file correctly, simply construct URL to this file by following the syntax (example):
locus-actions://https/dl.dropbox.com/u/sample/sample/test.xml
  • open link on Android device


As you can see, change simply the scheme to locus-actions, and the default scheme changes to a part of the base URL separated only by one slash. Locus GIS will simply handle this link: 

  1. removes locus-actions tag
  2. changes the first part into a new scheme


Sample syntax is:

<?xml version="1.0" encoding="utf-8"?>
<locusActions>
  <download>
    <source size="4552" date="2023-12-11_08-58-54">
      <![CDATA[https/dl.dropbox.com/u/sample/sample/test.zip]]>
    </source>
    <dest><![CDATA[/templates/downloaded_template.zip]]></dest>
    <after>extract</after>
  </download>
</locusActions>

        

Where

  • download - a core tag that identifies this action
  • source - URL to source file. If it contains size and date parameters, the downloaded file will be checked and not downloaded if it already exists.
    • 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 the correct time to the downloaded file. Highly recommended is to set only size for comparing already downloaded files.
  • dest - alternate path (to Locus root) where to put the new file
  • after - special action that is performed after download. Currently is supported:
    • 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
    • extract - extracts downloaded file. The directory is the same as for download.
    • deleteSource - allows to deletion of the downloaded file. This is useful mainly if you download a zipped file and after extracting it you want to remove it.