Acquire location

In almost every service you need to acquire user's location. This can be easily achieved with variables in URL - for example$lat&lon=$lon. But in most cases you want user to change his location - acquire from gps, type an address etc. In these cases use this slightly modified XHTML form.

Locify:variables and locify:where

You can use <locify:variables> tag in any XHTML form for setting values of inputs. You can use variables to fill location data. Read more in locify namespace reference.

<locify:where> is a special form component, which allows user to select location. See screenshot below. When using this tag, you need to set lat/lon into hidden fields in your form.


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="" xmlns:locify="" xml:lang="en" lang="en">
    <title>Acquire location</title>
    <form action="" method="post">
        <locify:element name="latitude" value="$lat" />
        <locify:element name="longitude" value="$lon" />
        <locify:where />
        <input type="hidden" name="latitude" value="" />
        <input type="hidden" name="longitude" value="" />
        <input type="submit" value="Send!" />

How it looks like

Acquire location screenshot