I have created a VF page that is used inside an iframe on my lightning component. The iframe has attribute allow="geolocation;". Geolocation doesn't work on it when I try to use either Esri map's Locate widget or the navigator.geolocation.getCurrentPosition(myCallback); javascript method. Error I get is "Geolocation has been disabled in this document by Feature Policy.".

All this, however, WORKS when I access the page directly via /apex/myPage URL or when using it on other pages.

How to enable geolocation on my lightning component?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.