Hey All,
im new in the survey123 js api, and at the moment im trying to get the coordinates x and y from the map component.
im using onFormLoaded to get the Form. And with onQuestionValueChanged i wanted to get the x and y values, whenever i click on the map. But my problem is, the values in the questtion map are always null
let webform = new Survey123WebForm({
itemId: '...',
container: 'test',
clientId: '...',
portalUrl: '...',
onFormLoaded:(data) =>
{
console.log(data);
console.log(data.form.questions);
console.log(webform.getContainer());
OnQuestionValueChanged:onValueChanged(data)
},
});
function onValueChanged(data)
{
if(data.form.questions[0].label === "map"){
//here i wanted to do something like
x = data.form.questions[0].value.x
y = data.form.questions[0].value.y
}
}