Saving GPS coordinates

More
2 years 6 months ago #118564 by holch
holch replied the topic: Saving GPS coordinates
@tpartner: And it is not even 1.92, it is 1.91, even older...

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
2 years 6 months ago #118589 by shawnchan
shawnchan replied the topic: Saving GPS coordinates
Oh..I guess I have to upgrade Limesurvey before asking for help again.

Thanks again for your advise.

Please Log in to join the conversation.

More
2 years 6 months ago #118976 by shawnchan
shawnchan replied the topic: Saving GPS coordinates
I used your scripts on Demo version of limesurvey and I can get the GPS coordinates now. The GPS coordinates is automatically shown the text box when I open the survey. Thanks tpartner for that.

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.

Is there any way we can "secretly" store the GPS coordinates without noticing the users? because now GPS coordinates is shown on screen and even can be edited by users. I tried to do it by hiding the questions but I can't get the GPS coordinates when the question is hidden.

Please Log in to join the conversation.

More
2 years 6 months ago #118981 by tpartner
tpartner replied the topic: Saving GPS coordinates
You cannot manipulate a question that is hidden with the advanced question settings.

Try hiding the question with JavaScript.

<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>

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: daleal

Please Log in to join the conversation.

More
2 years 6 months ago #119032 by shawnchan
shawnchan replied the topic: Saving GPS coordinates
It's works perfectly now!!! Thanks a lot!

Please Log in to join the conversation.

More
1 year 8 months ago #131079 by rasheed
rasheed replied the topic: Saving GPS coordinates
Hello,

I wonder if there is a similar script for getting the device system info such as OS, Navigator,..

Thank you !

Please Log in to join the conversation.

More
1 year 8 months ago #131081 by holch
holch replied the topic: Saving GPS coordinates
Yes there is and you can find an example here in the forum. It might be a little older, but I gave an example where you save a lot of data about the browser and the screen etc. via Javascript into a hidden question. I am not sure if OS is included, but should be possible to include.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
1 year 8 months ago #131082 by holch
holch replied the topic: Saving GPS coordinates
Here the post that I mention. You just need to find out how to reference the OS via Javascript, but you should find some examples out there for this.

www.limesurvey.org/forum/can-i-do-this-w...g-screen-size#127805

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
The following user(s) said Thank You: rasheed

Please Log in to join the conversation.

More
1 year 6 months ago #134398 by Mazi
Mazi replied the topic: Saving GPS coordinates

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.

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.
You can simply make such a question mandatory and that way force the user to always store the current location together with all other response details.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
1 year 6 months ago #134489 by first
first replied the topic: Saving GPS coordinates
I guess most of you already know but just for who don't..

Location from web browser:
#Gives the coordinates of the nearest Internet server respondent is connected to when survey start.
#Respondent will get a prompt in his browser which he has to confirm only then location will get captured.
#This approach will work even if device do not have GPS like laptop / desktop etc.

Location GPS(eg In Mazi offline application ):
#Capture coordinate using mobile GPS system.
#Highly precise
#No internet connectivity required.

It is very frequent requirement CAPI survys to capture GPS location the moment Interview starts. Clients wants it to confirm that interviewers and doing genuine interview.

Survey Designer and Programmer

Please Log in to join the conversation.

More
1 year 1 month ago #140862 by mounabelaid
mounabelaid replied the topic: Saving GPS coordinates
Hello
Would you tell where should I put exactly this script in LimeSurvey?

Please Log in to join the conversation.

More
1 year 1 month ago #141009 by Mazi
Mazi replied the topic: Saving GPS coordinates

mounabelaid wrote: Hello
Would you tell where should I put exactly this script in LimeSurvey?


If you are talking about the OfflineSurveys GPS location tracking feature, that is pretty simple to set up:
  1. Go to www.offlinesurveys.com/add-android-multimedia-question
  2. Download the "GPS location tracking" question/LSQ file from there.
  3. Import the LSQ file at your survey (this can be done when creating a new question)
  4. Activate the survey and cache the survey for offline usage
That survey should now include the GPS location tracking feature.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
1 year 4 weeks ago #141895 by mana
mana replied the topic: Saving GPS coordinates
hi
this code don't work in the app
i need code like this for location position . (in offline survey )
thanks

Please Log in to join the conversation.

More
1 year 4 weeks ago #141905 by tpartner
tpartner replied the topic: Saving GPS coordinates
This is not a forum for OfflineSurveys support. Please contact them directly.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
1 year 3 weeks ago #141907 by Mazi
Mazi replied the topic: Saving GPS coordinates

mana wrote: this code don't work in the app


"Doesn't work" is not an appropriate error description.
- Are there any error messages?
- Which Limesurvey version do you use?
- Which OfflineSurveys version do you use?
- Did you edit the downloaded question? I just tested it and it worked fine for my at the OfflineSurveys app.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now