Get geolocation in Client Session [message #1849396] |
Mon, 17 January 2022 08:39  |
Eclipse User |
|
|
|
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
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03459 seconds