How to enable Location access #3719
Replies: 2 comments 1 reply
-
Geolocation is not supported. Upstream support was removed. |
Beta Was this translation helpful? Give feedback.
-
Another option is to mock the relevant geolocation APIs in JavaScript yourself like mentioned in https://magpcss.org/ceforum/viewtopic.php?f=6&t=17432 Here is an example, Google Earth uses browser.ExecuteScriptAsyncWhenPageLoaded(@"
navigator.permissions.query = options => {
return Promise.resolve({
state: 'granted'
});
};
navigator.geolocation.getCurrentPosition = (success, error, options) => {
success({
coords: {
latitude: -33.854477,
longitude: 151.234738,
accuracy: 10,
altitude: null,
altitudeAccuracy: null,
heading: null,
speed: null
},
timestamp: Date.now()
});
};
navigator.geolocation.watchPosition = (success, error, options) => {
success({
coords: {
latitude: -33.854477,
longitude: 151.234738,
accuracy: 49,
altitude: null,
altitudeAccuracy: null,
heading: null,
speed: null
},
timestamp: Date.now()
});
return 0;
};
", oneTime: false); See https://developer.mozilla.org/docs/Web/API/Geolocation for the JavaScript APIs.. Cef references to removed geolocation APIs: |
Beta Was this translation helpful? Give feedback.
-
Hello Team,
Possible solutions tried:
How to enable the "Location services", can any one help with this.
Beta Was this translation helpful? Give feedback.
All reactions