I want to vary the radius of a circle made in Google Maps API3 based on a jQuery Mobile range selector:
However, Chrome Web Developer keeps issuing the error "Uncaught Error: Invalid value for property : _" every time I alter my slider. Why?
I solved my own problem. The problem was that Google Maps API3 was parsing $(this).val()
as a string, whereas an integer value was needed. To solve this issue, I replaced $(this).val()
with parseInt($(this).val())
.
Here is my final javascript.
$('input#circleRadius').change(function() {
circle.setRadius(parseInt($(this).val()));
});
});