Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Get geolocation in Client Session (Get client geolocation in eclipse scout)
Get geolocation in Client Session [message #1849396] Mon, 17 January 2022 13:39 Go to next message
Oleg Zhuravlev is currently offline Oleg ZhuravlevFriend
Messages: 8
Registered: January 2022
Junior Member
Hello, any suggestions why the geolocation request might not work:
I add request geolocation for test in one day tut in ClientSession

@Override
protected void execLoadSession() {
... (original tut code)

    // test
    // initially, I always have parameter GeoLocationServiceAvailable as False
    getDesktop().getUIFacade().setGeoLocationServiceAvailableFromUI(true);

    if (getDesktop().isGeolocationServiceAvailable()) {
        Future<Coordinates> localUserFutureCoordinates = getDesktop().requestGeolocation();
    
    //getDesktop().getUIFacade().fireGeolocationDetermined("1.0", "2.0");
    try {
        localUserLocation = localUserFutureCoordinates.get(5000, TimeUnit.MILLISECONDS).toString();

...


But result always bad

In config.properties
### Environment
scout.devMode=true
scout.auth.cookieSessionValidateSecure=false

If I run local html with script navigator.geolocation.getCurrentPosition, I have normal coordinates after the browser requests permissions. When visiting the dev Contact local site, the browser does not requests permissions at all.

Will be grateful for any indication of the direction to move


Re: Get geolocation in Client Session [message #1849434 is a reply to message #1849396] Wed, 19 January 2022 17:51 Go to previous messageGo to next message
Claudio Guglielmo is currently offline Claudio GuglielmoFriend
Messages: 256
Registered: March 2010
Senior Member
Hi Oleg,

waiting for the future probably blocks the startup of the session. Just add a button and request the location on the button click. Does that work?

Re: Get geolocation in Client Session [message #1849439 is a reply to message #1849434] Thu, 20 January 2022 06:11 Go to previous message
Oleg Zhuravlev is currently offline Oleg ZhuravlevFriend
Messages: 8
Registered: January 2022
Junior Member
its realy work, thank
Previous Topic:New Scout version 10 released
Next Topic:Problem with running application, Scout 10
Goto Forum:
  


Current Time: Wed May 08 09:32:17 GMT 2024

Powered by FUDForum. Page generated in 0.04826 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top