How to prompt for permission to use current location

I have a tool that allows you to test my API. One of the functions of the API is to upload a photo and read and store the EXIF data. If I use the tool from a phone (ios) it strips the data from a PC it works fine. I believe this is because the web page does not have permission to access LBS on the phone. I have seen other pages ask for permission and I am assuming I need to as well but not sure how and my search so far has failed. Please let me know how to request this permission.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

If memory serves the exif data is stripped by iOS prior to the upload, this is from a while back and I don't if it is still relevant.
Giovanni HewardCommented:
Instead of the Exif route, you could look into the browser Geolocation API.


if (navigator.geolocation) {
     // Browser supports it, we're good to go!
} else {
     alert('Sorry your browser doesn\'t support the Geolocation API');

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
skioneAuthor Commented:
Firstly, this problem happens within the app as well as the API test tool. I need exif data because I need more than GPS coordinates. (ISO, appeture, etc). I know it can be done because the flickr app is doing it. I was assuming that asking for location permission would allow this to work. Perhpas that is not the only thing that needs to be done, with that said, there still must be a way for a website to ask for location permission since google maps (and others) are doing it.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.