Table of Contents

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 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:

How to

The whole file you provide to Locus is an XML file with this syntax:

<?xml version="1.0" encoding="utf-8"?>
<locusActions>
  <action>...</action>
</locusActions>

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 a URL to this file with the following syntax (example):

locus-actions://https/dl.dropbox.com/u/12579512/my_directory/test.xml

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

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

Download

An action object that serves downloading files into the Locus directory.

Sample syntax is:

<?xml version="1.0" encoding="utf-8"?>
<locusActions>
  <download>
    <source size="22075830" date="2012-06-29_19-11-54">
      <![CDATA[http://.../map.tar]]>
    </source>
    <dest><![CDATA[/maps/map.tar]]></dest>
    <after>...</after>
  </download>
</locusActions>

Where

TIPS

Event

An action that triggers a certain action.

Sample syntax is:

<?xml version="1.0" encoding="utf-8"?>
<locusActions>
  <event>
    <key>setMapVector</key>
    <value><![CDATA[ /mapsVector/DownloadedMap.map ]]></value>
  </event>
</locusActions>

Where