- Posts: 967
- Thank you received: 220
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Prefill map information from token
- tammo
- Topic Author
- Offline
- Official LimeSurvey Partner
Less
More
5 years 4 months ago #178333
by tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Replied by tammo on topic Prefill map information from token
What I hoped to achieve is by setting the default position with token values, the map would be centered around the position I want. With a small javascript I hope to then place the marker. Using Google Maps this goed automatically, using Open Street Maps it does not...
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11661
- Thank you received: 2742
5 years 4 months ago - 5 years 4 months ago #178335
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Prefill map information from token
Just did a quick test on openstreetmap.org: Even there, no pin is shown, when you insert coordinates. So I guess this is rather an openstreetmap problem, then Limesurvey.
52 / 5 gives me Utrecht, correct?
52 / 5 gives me Utrecht, correct?
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Last edit: 5 years 4 months ago by holch.
The topic has been locked.
- tammo
- Topic Author
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 967
- Thank you received: 220
5 years 4 months ago #178336
by tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Replied by tammo on topic Prefill map information from token
Yes, you are right about that: OSM does not place a marker. That is why we need a javascript to do that.
But firstly we need that the lat/long values are read from the token table into the default position field, so the maps centers around the position in that default field.
We have been able to fill the default position with lat long values, but not from token fields.
But firstly we need that the lat/long values are read from the token table into the default position field, so the maps centers around the position in that default field.
We have been able to fill the default position with lat long values, but not from token fields.
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
- tammo
- Topic Author
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 967
- Thank you received: 220
5 years 4 months ago #178338
by tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Replied by tammo on topic Prefill map information from token
And yes, Utrecht is right. We work from Amersfoort, which is close. But we wanted to try with integer values first...
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11661
- Thank you received: 2742
5 years 4 months ago #178339
by holch
Limesurvey seems to create substitute the word _demo_ (all lower case) and transforms it into _Demo_
So the token in Tammo's test links is:
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Prefill map information from token
By the way: The token is not "Demo", but "Demo"...
Limesurvey seems to create substitute the word _demo_ (all lower case) and transforms it into _Demo_
So the token in Tammo's test links is:
Code:
demo
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11661
- Thank you received: 2742
5 years 4 months ago #178340
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Prefill map information from token
I guess you should use a different token... all instances of d-e-m-o are transformed into D-e-m-o, even within the code tag. This should not happen...
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- tammo
- Topic Author
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 967
- Thank you received: 220
5 years 4 months ago #178342
by tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Replied by tammo on topic Prefill map information from token
Haha, I love self-thinking editors!
New token has been defined.
Token: test
New token has been defined.
Token: test
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
5 years 4 months ago - 5 years 4 months ago #178344
by DenisChenu
PS : use {TOKEN:ATTRIBUTE_1} {TOKEN:ATTRIBUTE_2} in default location MUST work : without set the pin or set value in text input : please report the issue.
PS2 : i do a test : prefilling default location by previous value : it' sOK , if you update IP as default location to No. Else moving backward/forward show the pin : must be same with Default value. I use skelvanilla (no ajax mode etc … ) for template.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Prefill map information from token
manual.limesurvey.org/Default_answers but i think @holch found it.tammo wrote: What do you mean by DEFAULT?
I think it's an issue, very minor if corrdinate was set, but must be fixedholch wrote: Just did a quick test on openstreetmap.org: Even there, no pin is shown, when you insert coordinates. So I guess this is rather an openstreetmap problem, then Limesurvey.
PS : use {TOKEN:ATTRIBUTE_1} {TOKEN:ATTRIBUTE_2} in default location MUST work : without set the pin or set value in text input : please report the issue.
PS2 : i do a test : prefilling default location by previous value : it' sOK , if you update IP as default location to No. Else moving backward/forward show the pin : must be same with Default value. I use skelvanilla (no ajax mode etc … ) for template.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Attachments:
Last edit: 5 years 4 months ago by DenisChenu. Reason: PS2
The topic has been locked.
- tammo
- Topic Author
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 967
- Thank you received: 220
5 years 4 months ago #178345
by tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Replied by tammo on topic Prefill map information from token
OK, will report.
Thank you (Denis, holch) for your "triage". Owe you a beer. Or a wine.
Thank you (Denis, holch) for your "triage". Owe you a beer. Or a wine.
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
5 years 4 months ago - 5 years 4 months ago #178346
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Prefill map information from token
@tammo : i update : seem to work with a previous question. Your survey are not anonymous ?
Test link : master.sondages.pro/234122?newtest=Y
Test link : master.sondages.pro/234122?newtest=Y
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 5 years 4 months ago by DenisChenu.
The topic has been locked.
- tammo
- Topic Author
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 967
- Thank you received: 220
5 years 4 months ago #178349
by tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Replied by tammo on topic Prefill map information from token
When I use tokens, the survey is anonymous. Or do I misunderstand you now?
Tammo
Tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
- tammo
- Topic Author
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 967
- Thank you received: 220
5 years 4 months ago #178350
by tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Replied by tammo on topic Prefill map information from token
You mean: fill in token to question 1 and then fill in these values in map question? Like adding another layer?
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.