Geolocation

Version 5 by Ken Fyten
on Nov 13, 2014 11:40.


compared with
Current by Ken Fyten
on May 30, 2016 15:27.


 
Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 2 changes. View first change.

 h2. Overview
 _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.
  
 {info:title=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 https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-powerful-features-on-insecure-origins for more information. \\ \\
 Due to this change, this component now requires that your ICEfaces application is accessed using HTTPS protocol from the browser.{info}
  
  
 h2. 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.
  
 {code:xml}
 <h:form>
  <mobi:geolocation id="geolocation"
  latitude="#{bean.latitude}"
  longitude="#{bean.longitude}"
  altitude="#{bean.altitude}"
  direction="#{bean.direction}" />
  <h:commandButton value="Submit" />
 </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 *latitude* attribute is where the user's latitude is going to be saved (in decimal degrees).
 {panel}
  
 {panel}
 The *longitude* attribute is where the user's longitude is going to be saved (in decimal degrees).
 {panel}
  
 {panel}
 The *altitude* attribute is where the user's altitude is going to be saved (in meters).
 {panel}
  
 {panel}
 The *direction* attribute is where the user's direction is going to be saved (in degrees from the North).
 {panel}
  
 h2. Event Listeners
  
 None.
  
 h2. Client Behavior Events
  
 None.
  
 h2. JavaScript API
  
 None.
  
 h2. Keyboard Support
  
 None.
  
 h2. Known Issues
  
 None.
  * 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 https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-powerful-features-on-insecure-origins for more information. Due to this change, this component now requires that your ICEfaces application is accessed using HTTPS protocol from the browser.
  
 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*

© Copyright 2018 ICEsoft Technologies Canada Corp.