Saving the "this.questionID" variable | XM Community
Skip to main content

Saving the "this.questionID" variable

  • August 29, 2022
  • 1 reply
  • 186 views

Forum|alt.badge.img

Hello!
I am using the github repo: https://github.com/keita-makino/qualtrics-map to generate a map, based on an address. The function returns the longitude and latitude.
I would also like to store the actual address, as well.
Here is the JS code:
Qualtrics.SurveyEngine.addOnload(function () {
  document
    .getElementById(this.questionId)
    .querySelectorAll('[role*=presentation]')[0].style.display = 'none';
});


Qualtrics.SurveyEngine.addOnReady(function () {
  mapRender(apiKeyGoogleMap, document.getElementById(this.questionId));
});


// If you need to set a default center
Qualtrics.SurveyEngine.addOnReady(function () {
  mapRender(apiKeyGoogleMap, document.getElementById(this.questionId), {
    location: {
      lat: 50,
      lng: -100,
    },
    zoom: 12, // Optional
  });
});
#General/Header code:







How would I go about saving the actual address, please?

Thanks so much,
Erin

1 reply

Deepak
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+46
  • October 29, 2022

ehodgess
Have you checked out this page?
Hope it helps!