- Posts: 8
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Cannot load the map(OpenStreetMap) after update
- dqzhou
- Topic Author
- Offline
- New Member
Less
More
1 month 2 weeks ago - 1 month 2 weeks ago #258428
by dqzhou
Cannot load the map(OpenStreetMap) after update was created by dqzhou
Please help us help you and fill where relevant:
Your LimeSurvey version: 6.4.12
Own server or LimeSurvey hosting:
Survey theme/template:
==================
Hi,
When we check the map-related questions after version update, we notice it is difficult to load successfully. It would be not ideal for respondents. Before updating, this case did not exist. I also checked the Google map, it does not work either.
Is it possible to solve? I attached the unloading maps. Thank you in advance!
Best regards,
dq
Your LimeSurvey version: 6.4.12
Own server or LimeSurvey hosting:
Survey theme/template:
==================
Hi,
When we check the map-related questions after version update, we notice it is difficult to load successfully. It would be not ideal for respondents. Before updating, this case did not exist. I also checked the Google map, it does not work either.
Is it possible to solve? I attached the unloading maps. Thank you in advance!
Best regards,
dq
Last edit: 1 month 2 weeks ago by dqzhou.
Please Log in to join the conversation.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
1 month 2 weeks ago #258466
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 Cannot load the map(OpenStreetMap) after update
Not related to development, i move.
I just test : no issue for me.
Can you show your browser console (F12) for error ?
I just test : no issue for me.
Can you show your browser console (F12) for error ?
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:
Please Log in to join the conversation.
- dqzhou
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
1 month 2 weeks ago #258477
by dqzhou
Replied by dqzhou on topic Cannot load the map(OpenStreetMap) after update
Please Log in to join the conversation.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
1 month 2 weeks ago #258497
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Cannot load the map(OpenStreetMap) after update
I also have no problem with the OpenStreetMap.
I suspect the problem with Google is that you have an incorrect API key.
- manual.limesurvey.org/Global_settings/en#General
- developers.google.com/maps/documentation/javascript/get-api-key
Can you attache a small sample survey containing only the relevant questions?
I suspect the problem with Google is that you have an incorrect API key.
- manual.limesurvey.org/Global_settings/en#General
- developers.google.com/maps/documentation/javascript/get-api-key
Can you attache a small sample survey containing only the relevant questions?
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.
- dqzhou
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
1 month 2 weeks ago #258503
by dqzhou
Replied by dqzhou on topic Cannot load the map(OpenStreetMap) after update
Hi Tony,
I attached the relevant question group in the end. Thank you for your check!
I attached the relevant question group in the end. Thank you for your check!
Please Log in to join the conversation.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
1 month 2 weeks ago #258504
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Cannot load the map(OpenStreetMap) after update
Please send a survey export (.lss file) containing only the relevant questions.
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.
- dqzhou
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
1 month 2 weeks ago #258506
by dqzhou
Replied by dqzhou on topic Cannot load the map(OpenStreetMap) after update
Hi,
I attached the .lss file. I checked again, it is still difficult to be loaded.
I attached the .lss file. I checked again, it is still difficult to be loaded.
Please Log in to join the conversation.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
1 month 2 weeks ago #258507
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Cannot load the map(OpenStreetMap) after update
The map is working but, as the question is initially hidden by relevance, the map is rendered at its smallest possible size.
You will either need to move it to another group or hide the question via CSS and use JavaScript to show it when the "indicate it on the map" checkbox is selected.
You will either need to move it to another group or hide the question via CSS and use JavaScript to show it when the "indicate it on the map" checkbox is selected.
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.
- dqzhou
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
1 month 2 weeks ago #258508
by dqzhou
Replied by dqzhou on topic Cannot load the map(OpenStreetMap) after update
Hi Tony,
If I move it to another group, it looks strange for the whole survey.
I may further ask for the JS code to show it when the checkbox is selected. Thank you very much!
Best regards,
dqzhou
If I move it to another group, it looks strange for the whole survey.
I may further ask for the JS code to show it when the checkbox is selected. Thank you very much!
Best regards,
dqzhou
Please Log in to join the conversation.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
1 month 2 weeks ago #258509
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Cannot load the map(OpenStreetMap) after update
1) Assign the map question a CSS class "custom-hidden".
2) Place this script in the source of the checkbox question:
3) Place this CSS in the source of the checkbox question:
4) Modify the checkbox question validation to enforce a map selection if the second checkbox is selected (I left this for you to do).
Sample survey attached:
2) Place this script in the source of the checkbox question:
Code:
$(document).on('ready pjax:scriptcomplete',function(){ // Identify some elements var thisQuestion = $('#question{QID}'); var mapCheckbox = $(':checkbox:last', thisQuestion); var mapQuestion = $(thisQuestion).nextAll('.text-short:eq(0)'); // Listener on the checkbox $(mapCheckbox).on('change', function(e) { handleMap(); }); // Initial state handleMap(); // Function to handle the map visibility function handleMap() { if($(mapCheckbox).is(':checked')) { $(mapQuestion).removeClass('custom-hidden'); } else { $(mapQuestion).addClass('custom-hidden'); } }; }); </script>
3) Place this CSS in the source of the checkbox question:
Code:
<style type="text/css" data-author="Tony Partner"> .custom-hidden { position: absolute; left: -9999em; } </style>
4) Modify the checkbox question validation to enforce a map selection if the second checkbox is selected (I left this for you to do).
Sample survey attached:
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.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
1 month 2 weeks ago #258520
by DenisChenu
It must be reported
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 Cannot load the map(OpenStreetMap) after update
If i don't make error : this issue was already fixed in 3.XThe map is working but, as the question is initially hidden by relevance, the map is rendered at its smallest possible size.
You will either need to move it to another group or hide the question via CSS and use JavaScript to show it when the "indicate it on the map" checkbox is selected.
It must be reported
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.
Please Log in to join the conversation.