Quantcast
Channel: Topics in Category: Can I do this with LimeSurvey? - LimeSurvey forums
Viewing all articles
Browse latest Browse all 17529

Detect Google Map selection and do calculations with input - by: Rallard

$
0
0
Hi everyone,

I can find little on using the Google maps API, but I've been able to setup the maps API to show a region of interest,and accept input from the user. It seems as if the location selected cannot be detected in the Expression manager (I tried using an Equation Question) until the "Next" button is pressed (assuming user actually selected a location). However I want to be able to validate the choice before the user proceeds to the next page (basically measuring the distance between the point chosen in one map and that chosen in another). So

How can I read the value of the location chosen on the map with an event such as Onclick or Onchange? I've tried:
$('input[id="answer{SGQ}"]').change(function() {
   // code
});

as well as
document.getElementById('gmap_canvas_SSSSSSXGGXQQ_c').click(function() {
   //code
});

but nothing happens (even inside the
$(document).ready()
)

R

LimeSurvey
Version 2.00+ Build 130514

Viewing all articles
Browse latest Browse all 17529

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>