- Basics
- Extended GUI
- Available features
- More
- Reference
- Examples
- Finishing
Variables
Variables are the way to input some Locify-specific data into your XHTML pages. Variables enables you to get location-based data, use service settings and couple of other things.
All variables starts with char '$'. Variables can be used in URL's everywhere and in the value of <input>
tags and in <locify:variables> tag in forms.
Location-based data
- $lat - current latitude in decimal format
- $lon - current longitude in decimal format
- $alt - current altitude in meters
- $spe - current speed in km/h
- $hea - current heading (0-360°)
- $acc - vertical accuracy of location in meters
- $location[source] - source of location. Can be one of following:
- 0 - GPS
- 1 - Saved location
- 2 - Address
- 3 - Manually entered coordinates
- 4 - Last known GPS location
- $location[text] - additional text about location - geocoded address, name of saved location etc.
Service settings
Service settings can be created by regular xhtml form. The only difference is action url set to
locify://serviceSettings. Values of this form are stored locally in client and you can use this settings in your
XHTML pages. You can read settings by using this variable:
- $settings[variable_name] - value of given name from service settings
Client info
- $client[time] - current time in user's phone as unix timestamp
- $client[lang] - language of user's cell phone (can be different from language used in Locify - this information is available in user-agent string)
- $client[version] - version of Locify client
- $client[width] - available canvas width in pixels
- $client[height] - available canvas height in pixels
- $client[device] - MicroEdition.Platform identification of user's phone in format
Vendor/PhoneModel/Firmware_version"
User-agent
User-agent is small header sent with every request from Locify. You can find there information about Locify version and language selected in Locify. Format of user-agent string:
Locify/version/language/Additional_phone_info
Sample user-agent:
Locify/0.7.2/cs_CZ/SonyEricssonW960i/R100 Profile/MIDP-2.0 Configuration/CLDC-1.1
