pnp/PnP

browser Location prompt

MunojKannan opened this issue · 0 comments

Hi all,

we need to get the users current position in SharePoint online site. we are using the below code in SPFx extension

navigator.geolocation.getCurrentPosition((position) => {
let latitude = position.coords.latitude;
let longitude = position.coords.longitude;
});

we are able to get the latitude and longitude.
The issue is the browser location prompt is asking more than one time when we allow the browser to access the location, the issue occurs in "Edge" browser.
Is there any way to restrict the prompt to ask for only one time or directly access the location without the user permission in SharePoint online site.
Expecting the response as soon as possible.

Thanks all