pnp / PnP

SharePoint / Office 365 Developer Patterns and Practices - Archived older solutions. Please see https://aka.ms/m365pnp for updated guidance

Home Page:https://aka.ms/m365pnp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

browser Location prompt

MunojKannan opened this issue · 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