ALOV logo

DOCUMENTATION

To link a map objects with www resources you have to define URL templates. URL template can contain tags that will be dynamically substituted at runtime with values from attribute data or other program variables.

For example "NAME" is field name from Cities layer and your link is:

http://www.xyz.com/[NAME].html

If user selects Paris on map, applet request the browser show the document

http://www.xyz.com/Paris.html

The field value can be formatted. You may define the result length and char case. Length specifier indicates that the resulting string must be specified length; if the field's value has less chars, the resulting string is left-padded with zeros. Char case specifier may be $U (the resulting string will be in upper case) or $L (lower case).

For example your link is:

http://www.xyz.com/photos/[PHOTO_ID,5,$L].jpeg

If value of field PHOTO_ID is "1A" the the resulted URL will be

http://www.xyz.com/photos/001a.jpeg

The following table summarizes other possible tags:

$LAYERNAMEname of current (active) layer (defined by "label" attribute).
$LAYERIDid of current layer (defined by "name" attribute).
$DATASETIDid of current layer (dataset id) in Clearinghouse database
$PASSTHROUGHthis tag is substituted with value of applet's parameter "external".
$SEARCHthe value of search criterion for "searchlink", or list of records ids for "infolink"
Extents. The tags that start with "BBOX" gives a single comma-delimited string in a particular order containing values for xmin, xmax, ymin and ymax. Four others are substituted with the separate coordinates.
$BBOXALLcurrent map extent
$BBXMIN, $BBXMAX, $BBYMIN, $BBYMAX
$BBOXDRmarked extent
$DRXMIN, $DRXMAX, $DRYMIN, $DRYMAX
$BBOXSELextent of selected records
$SELXMIN, $SELXMAX, $SELYMIN, $SELYMAX

The links may defined in the metadata or in project file.

In metadata:

<metadata> ... <meta id="63" content="http://www.google.com/search?q=[ID]"> </metadata>

In project file:

<project> <mainlink> http://www.google.com/search?q=[NAME] </mainlink> <layer name="layer2"> <dataset url="zyx.zip"/> <mainlink> http://www.xyz.com/q=[NAME] </mainlink> </layer> </project> If link for a layer is defined in project file it is utilized instead of link from metadata. The project level link is used by default if layer hasn't a link.

There are four types of web links.

Name of element in project file Metadata element # Description
mainlink 63 It is utilized when program has to create a link for a particular object - when user selects one object on map or highlights a row in the grid on the attribute window
infolink 302 Invoked when user selects several objects. If this link is defined, the program uses it instead of opening an attribute window
searchlink 301 This link overdefines the internal search routine.
tipslink 310 It's used instead of standard tips. It's invoked when user moves the cursor over objects on map. Because this link is invoked very frequently, it is recommended to link some client side resources. For example javascript invocation in the neighbour frame.
before v0.84 mainlink was renamed from linkmask

By default applet request the browser show the linked Web page in HTML frame (or window) with name "infoWindow". Before it, applet tries to load in this window the page top.html. This page contains small JavaScript code that gives focus (moves on top) to the this browser window. You may define your own target browser frame and pre-load page via applet's parameters:

<applet ...> <param name="prepage" value="load_first.html"> <param name="target" value="wnd_result"> </applet>

To prevent preliminary load, set the value "no" for parameter "prepage".

<param name="prepage" value="no">

This example demonstrates how the links work. Compare behaviour of layers with and without links.


See project file

previous  top next


© ALOV 2002-2005 contact6 at alov.org