View Source

h2. Overview
_Since 4.0_
_Until 4.2_

{warning}As of January of 2017 the BridgeIt project has been [deprecated|http://www.icesoft.org/blog/the-future-of-bridgeit/]. As a result, this component has been removed from ICEfaces as of the 4.2 release.{warning}


The mobi:geotrack component renders a button that launches the Bridgeit application on the user's device to take initiate geotracking through the device's GPS. After this is initiated, Bridgeit will periodically send geoJSON data to the server, containing the user's current location and other data.

h2. Getting Started

To start using the GeoTrack component, simply place the mobi:geoTrack tag inside a form and bind the value to a backing bean property. Note that only application-scoped beans are supported for this component.
{code:xml}
<h:form>
<mobi:geoTrack
buttonLabel="Start GeoTracking"
strategy="continuous"
publish="#{applicationScopedBean.data}"
parameters="_userId: '#{bean.randomId}'" />
</h:form>
{code}

h2. Attributes

{tip:title=TagLib Documentation}This section covers attributes involved in the typical use-cases for this component. For reference, the complete taglib documentation for this component is available [here|http://res.icesoft.org/docs/v4_latest/mobi/tld/].{tip}

{panel}
The *buttonLabel* specifies the label of the button.
{panel}

{panel}
The *strategy* can either be 'continuous', 'significant' or 'stop'. When 'continuous', the location of the device will be uploaded as frequently as it changes, and when 'significant' the location is uploaded when it changes significantly. Use 'stop' to cease location tracking.
{panel}

{panel}
The *duration* attribute specifies the amount of time the geotracking will run for, expressed in hours.
{panel}

{panel}
The *publish* attribute is used to specify the application-scoped bean property where the geoJSON data and other parameters will be published to.
{panel}

{panel}
The *parameters* is used to specify custom parameters that will be echoed by Bridgeit whenever it sends geotracking data to the server. These parameters can be used to identify individual users, pages, etc. The parameters must be in correct JSON format (without the opening/closing brackets), and the names should always start with the underscore character (e.g. "_viewId: '/geotracking.jsf', _userId: '001'").
{panel}

h2. Event Listeners

None.

h2. Client Behavior Events

None.

h2. JavaScript API

None.

h2. Keyboard Support

Standard keyboard actions for HTML buttons are supported, such as tabindex and pressing the enter or space keys to activate the button.

h2. Known Issues

None.

h2. Additional Resources


h4. Sample Applications

This component appears in the following ICEfaces sample applications:

* *[ICEfaces Mobile Showcase|http://icefaces-showcase.icesoft.org/showcase-mobile.jsf]*

h4. Tutorials

This component appears in the following ICEfaces tutorials:

*None*