- Posts: 965
- Thank you received: 218
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 #178294
by tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Prefill map information from token was created by tammo
I want to define a question that presents the respondent with a map that is based on information from the token table.
For example: from people we know here they have a machine. We want to show a map where we think that the machine is. And then ask them if this position is correct.
I hoped to do this with a short tect question, map display. But using Open Street Maps I cannot show a pin, based on known lat/long values from the token. Or can I?
Thanks in advance,
Tammo ter Hark
For example: from people we know here they have a machine. We want to show a map where we think that the machine is. And then ask them if this position is correct.
I hoped to do this with a short tect question, map display. But using Open Street Maps I cannot show a pin, based on known lat/long values from the token. Or can I?
Thanks in advance,
Tammo ter Hark
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: 965
- Thank you received: 218
5 years 4 months ago #178295
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
We tried this:
<script>L.marker([52.15516, 5.38721]).addTo(document.getElementById("#map_727693X677X5661"));</script>
In the field of the question, but to no avail.
We hope to get the lat/long from tokens
<script>L.marker([52.15516, 5.38721]).addTo(document.getElementById("#map_727693X677X5661"));</script>
In the field of the question, but to no avail.
We hope to get the lat/long from tokens
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: 965
- Thank you received: 218
5 years 4 months ago #178296
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
Trying to add token attributes to default location also did not work.
See attached image: TOKEN:ATTRIBUTE_1 IS Latitude AND TOKEN:ATTRIBUTE_2 is Longitude in Token table. Of course I filled them with values that represent a position that is known.
See attached image: TOKEN:ATTRIBUTE_1 IS Latitude AND TOKEN:ATTRIBUTE_2 is Longitude in Token table. Of course I filled them with values that represent a position that is known.
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Attachments:
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
5 years 4 months ago - 5 years 4 months ago #178312
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
Did you try : ; for separator ?
github.com/LimeSurvey/LimeSurvey/blob/0c...nda_helper.php#L3161
and
github.com/LimeSurvey/LimeSurvey/commit/...bc1df3efc22a5b1f1cae
EDIT : oups, no you'r right
github.com/LimeSurvey/LimeSurvey/blob/ma...nda_helper.php#L3171
Must work …
github.com/LimeSurvey/LimeSurvey/blob/0c...nda_helper.php#L3161
and
github.com/LimeSurvey/LimeSurvey/commit/...bc1df3efc22a5b1f1cae
EDIT : oups, no you'r right
github.com/LimeSurvey/LimeSurvey/blob/ma...nda_helper.php#L3171
Must work …
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: 965
- Thank you received: 218
5 years 4 months ago #178315
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
Hi Denis,
thank you. I can have the right map centered around a predefined center, but I have not yet been able to place a marker and to prefill the default location from:
{TOKEN:ATTRIBUTE_1} (latitude)
{TOKEN:ATTRIBUTE_2} (longitude)
Tammo
thank you. I can have the right map centered around a predefined center, but I have not yet been able to place a marker and to prefill the default location from:
{TOKEN:ATTRIBUTE_1} (latitude)
{TOKEN:ATTRIBUTE_2} (longitude)
Tammo
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: 13597
- Thank you received: 2487
5 years 4 months ago #178316
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
Yes, but it **must** work … exactly yhe way you set it …
we process string in qanda (if current is not set)
Maybe as a workaround : you can test if it work in default value ?
The test here : github.com/LimeSurvey/LimeSurvey/blob/0c...nda_helper.php#L3163 seems strange : i think it must be == 1 and not == 0
we process string in qanda (if current is not set)
Maybe as a workaround : you can test if it work in default value ?
The test here : github.com/LimeSurvey/LimeSurvey/blob/0c...nda_helper.php#L3163 seems strange : i think it must be == 1 and not == 0
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.
The topic has been locked.
- tammo
- Topic Author
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 965
- Thank you received: 218
5 years 4 months ago #178317
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
survey.toolsforresearch.com/index.php/368136?lang=en
Token = demo
Token = demo
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: 13597
- Thank you received: 2487
5 years 4 months ago - 5 years 4 months ago #178324
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
Best with 10 10 for token attribue (more clear).
Did you try the workaround ?
Maybe time to report issue
Did you try the workaround ?
Maybe time to report issue
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: 965
- Thank you received: 218
5 years 4 months ago #178327
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
Thank you for lookin into this. I filled in 52 and 5 now, not 10 10, because that may be somewhere in the ocean.
What do you mean by DEFAULT?
Tammo
What do you mean by DEFAULT?
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: 965
- Thank you received: 218
5 years 4 months ago #178328
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
survey.toolsforresearch.com/index.php/368136?lang=en
Token = Demo
Token = Demo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
- holch
- Away
- LimeSurvey Community Team
Less
More
- Posts: 11638
- Thank you received: 2737
5 years 4 months ago #178331
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
By the way: The token is not "Demo", but "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
- Away
- LimeSurvey Community Team
Less
More
- Posts: 11638
- Thank you received: 2737
5 years 4 months ago #178332
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
When using the default value there is not pin. When I insert latitude and longitude in to the boxes, the pin appears.
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.