- Posts: 10229
- Thank you received: 3643
Ask the community, share ideas, and connect with other LimeSurvey users!
<script type="text/javascript" charset="utf-8"> $(document).ready(function(){ // Identify this question var q1ID = '{QID}'; var q1 = $('#question'+q1ID); // Hide this question q1.hide(); function getGPS() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showGPS, gpsError); } else { $('input.text', q1).val('No GPS Functionality'); } } function gpsError(error) { //alert('GPS Error: '+error.code+', '+error.message); } function showGPS(position) { $('input.text', q1).val(position.coords.latitude+', '+position.coords.longitude); } getGPS(); }); </script>
One purpose of our recently released " OfflineSurveys " Limesurvey Android app is doing data collection on location. Since several users told us that it would be nice to store the current location's GPS coordinates, we have added an additional Android multimedia question type to get the current location from the device's GPS and store that at a Limesurvey question.shawnchan wrote: What I'm trying to do now is to use the GPS function as a measure of quality control, making sure that they have done the interviews at the correct location.