Table of Contents


Since 4.0

The mobi:geolocation component uses the HTML5 geolocation API to capture the user's geolocation data, including latitude, longitude, direction, and altitude. The user is asked for permission to provide this information, as soon as the page is loaded. Once this information is captured it can be sent to the server by simply submitting the form.

HTTPS Required
Recent browser releases have begun restricting access to certain powerful features, including geolocation tracking, to make them only accessible when the page content accessed via "secure origins" (such as HTTPS), where the full ancestor chain is also secure. See for more information.

Due to this change, this component now requires that your ICEfaces application is accessed using HTTPS protocol from the browser.

Getting Started

To use the Geolocation component, put the mobi:geolocation tag inside a form and bind its attributes to backing bean properties where the captured information is to be stored. Also add a means of submitting the form, so that the captured information can be uploaded to the server.

    <mobi:geolocation id="geolocation"
                      direction="#{bean.direction}" />
    <h:commandButton value="Submit" />


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.

The latitude attribute is where the user's latitude is going to be saved (in decimal degrees).

The longitude attribute is where the user's longitude is going to be saved (in decimal degrees).

The altitude attribute is where the user's altitude is going to be saved (in meters).

The direction attribute is where the user's direction is going to be saved (in degrees from the North).

Event Listeners


Client Behavior Events


JavaScript API


Keyboard Support


Known Issues

Additional Resources

Sample Applications

This component appears in the following ICEfaces sample applications:


This component appears in the following ICEfaces tutorials:


Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

© Copyright 2021 ICEsoft Technologies Canada Corp.