Have an idea?

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

Online surveys with GPS

I have a few questions about conducting an online survey using GPS:

•    Can we show a picture of the map where we are during the survey?

•    Can we edit the location shown by the map’s GPS to reflect our real location? (GPS in Cambodia leaves much to be desired)

•    Finally, when we export the information into our CSV file we would like it to only show:

                                Variable A. Latitude N: xxxxxxxxx
                                Variable B. Longitude E: xxxxxxxxx

Please help to share with us, how we can do these. We are currently using v8.4.6.
asked Aug 18, 2015 by Tola

2 Answers

0 votes
This isn't an area I know much about, but I'll try to help.

SSI Web does not have anything built in to capture GPS information or display a map.  However, we give you the freedom to put whatever you want into a survey.  Google Maps, for example, has an API you can use to embed maps on pages: https://developers.google.com/maps/documentation/embed/

I don't know much about getting GPS information, but it would seem like this would only work on a phone or tablet that has a GPS receiver.  I was able to find a few links about getting location information from a browser: http://stackoverflow.com/questions/2577305/how-to-get-gps-location-from-the-web-browser and http://www.w3schools.com/html/html5_geolocation.asp

We are working  on an Android app that will run the survey locally on the device.  It's currently in Beta, though it doesn't yet do some of the fancier things like saving GPS coordinates (though I believe that is in the plans for the future).  If you would be interested in testing you can send an e-mail to justin@sawtoothsoftware.com
answered Aug 18, 2015 by Brian McEwan Gold Sawtooth Software, Inc. (38,990 points)
0 votes
Hi Tola,

You can use the following code to record the GPS location as observed by the browser on many browsers (IE9+, Chrome, FF)

Define a free format question with 2 hidden variables and add the following to the HTML of that page. Make sure this page stays on screen for around 5 seconds (a long introduction works fine) and allow Geolocation requests to that domain (pop up asks for it)

<input name="GeoLoc01_lat" id="GeoLoc01_lat" type="hidden">
<input name="GeoLoc01_lon" id="GeoLoc01_lon" type="hidden">
<script type="text/javascript">
window.onload = function() {
    function onGPSSuccess(position)
    function onGPSError(position)
    navigator.geolocation.getCurrentPosition(onGPSSuccess, onGPSError, { maximumAge: 3000, timeout: 5000, enableHighAccuracy: true }); 
    navigator.geolocation.watchPosition(onGPSSuccess, onGPSError, { maximumAge: 3000, timeout: 5000, enableHighAccuracy: true }); 

answered Nov 13, 2015 by Bahadir Ozkurt Gold (16,910 points)
hi Bahadir can you advice on how to use following code in sawtooth. I have created Key of library where Place_API is added "<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBQcKigw7OH6jgdLW8Im26bRDss6ItLhbs&libraries=places"></script>"

but due to my little knowledge on HMTL language I am not able to make it work  in sawtooth

Hi Nischay, for some reason I never saw the reply you've made. do you still have this issue?
Hi Bahadir,

Thanks for checking, I haven't done any progress on this. Since we haven't purchase API yet so I believe without purchasing API from Google we can't implement this correctly? Our requirement was to capture address while respondent type in open-end box it should pop up a correct address from google so respondent can select from the drop down and we get the accurate address as many time respondent just give half information.

Any thought on this.

Thanks again for your support.