Repository navigation
How to enable Location access #3719
schandra09net
started this conversation in
General
Replies: 2 comments 1 reply
|
Geolocation is not supported. Upstream support was removed. |
0 replies
|
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: |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello Team,
Possible solutions tried:
How to enable the "Location services", can any one help with this.
All reactions