I used CartoDB.js to do a SQL query of a layer which also performs some calculations on the layer's fields. This part works fine, but I just can't figure out how to get the calculated field into my infobox template.
For example, in this sample code from the CartoDB github:https://github.com/CartoDB/cartodb.js/blob/develop/examples/tutorials/tutorial-2.htmlif I changed line 47 to be:
sql: "SELECT pop_other/10 AS testval FROM ..."How would I show that "testval" in an infowindow? I've tried doing {{content.data.testval}} on line 20, but that doesn't work.
أكثر...
For example, in this sample code from the CartoDB github:https://github.com/CartoDB/cartodb.js/blob/develop/examples/tutorials/tutorial-2.htmlif I changed line 47 to be:
sql: "SELECT pop_other/10 AS testval FROM ..."How would I show that "testval" in an infowindow? I've tried doing {{content.data.testval}} on line 20, but that doesn't work.
أكثر...