Here you can read about ADF Mobile application enabled with geo location features - GPS and Google Maps - ADF Mobile - Geo Location and Google Maps App. I would like to post update for this application where geo location is synchronized automatically, directly updating your position on Google Maps screen. Few minor usability updates are included as well - conditional check for 3G/Wi-Fi network and GPS availability.
Download version 2 for ADF Mobile Geo Location and Google Maps application - ADFMobileGoogleMaps_v2.zip. This update contains code to check if 3G/Wi-Fi and GPS functionality is available - displayed on UI:
Show button is enabled only if 3G/Wi-Fi connection is available, otherwise Google Maps are unaccessible. Start button is enabled only if GPS is available - location will be calculated only with active GPS signal.
Initial position is retrieved from GPS, this position is displayed on the map:
You don't need to switch back and request position correction - keep Google Maps window open, when GPS data will be recalculated - position will be refreshed and displayed automatically:
Go back to initial position screen, you can review synchronized location coordinates there:
3G/Wi-Fi network status is retrieved from ADF Mobile API directly - deviceScope.hardware.networkStatus:
Similar for GPS signal status - deviceScope.hardware.hasGeolocation:
GPS position synchronization is quite straightforward - method from pageFlowScope bean updates center coordinates:
Property Change Support listener is responsible to push data changes to the UI:
Point location layer from ADF Mobile maps component is mapped directly with pageFlowScope bean coordinates data - this allows to reload location point, when location coordinares are changing:
Download version 2 for ADF Mobile Geo Location and Google Maps application - ADFMobileGoogleMaps_v2.zip. This update contains code to check if 3G/Wi-Fi and GPS functionality is available - displayed on UI:
Show button is enabled only if 3G/Wi-Fi connection is available, otherwise Google Maps are unaccessible. Start button is enabled only if GPS is available - location will be calculated only with active GPS signal.
Initial position is retrieved from GPS, this position is displayed on the map:
You don't need to switch back and request position correction - keep Google Maps window open, when GPS data will be recalculated - position will be refreshed and displayed automatically:
Go back to initial position screen, you can review synchronized location coordinates there:
3G/Wi-Fi network status is retrieved from ADF Mobile API directly - deviceScope.hardware.networkStatus:
Similar for GPS signal status - deviceScope.hardware.hasGeolocation:
GPS position synchronization is quite straightforward - method from pageFlowScope bean updates center coordinates:
Property Change Support listener is responsible to push data changes to the UI:
Point location layer from ADF Mobile maps component is mapped directly with pageFlowScope bean coordinates data - this allows to reload location point, when location coordinares are changing: