Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

What kind of situations the question is not guaranteed to record the respondent's geolocation?

Hi,

Could you tell me what kind of situations the  question is not guaranteed to record the respondent's geolocation?

We will use tablets for our survey and we want to use this question to get gps informations for each participations. It is a require case for this project.

Thank you in advanced,
Hüseyin Dalgıç
related to an answer for: I need to get gps
asked Oct 24, 2018 by Hüseyin

1 Answer

0 votes
There are three possible reasons why that code might fail:

1.  Geolocation information unavailable

If your device does not support GPS or does not have geolocation information, it cannot provide this information to the survey.

2.  Permissions

Browsers are usually hesitant about giving location information to websites.  If you run this script in a browser, you will likely see a prompt asking whether or not you want the browser to give the website this information.  If a respondent sees and refuses this prompt, no geolocation information will be recorded.

I don't believe this should be a factor for studies conducted on Offline Surveys on Android devices because the application already requires GPS permissions to install.

3.  Timeout

This state will trigger if the process of getting the geolocation information takes too long.  As the original code's timeout is ten seconds, this seems like the least likely cause.

You can read more here:

https://developer.mozilla.org/en-US/docs/Web/API/PositionError/code
answered Oct 24, 2018 by Zachary Platinum Sawtooth Software, Inc. (120,175 points)
My device does not support GPS
...