Can i use conditional statements in cartodb?

المشرف العام

Administrator
طاقم الإدارة
I want to code my Cartodb.js map so that for each marker, if a column is not empty, it embeds a video into the infowindow, and if the column is empty, then it does noting.I saw this example online and tried to copy it, but it didn't work. http://www.w3schools.com/js/js_if_else.asp

for my code, inside the {{content}} area, I said: if ({{video_embed_link}} IS NOT NULL) {< iframe width="430" height="242" src="{{video_embed_link}}" frameborder="0"> < /iframe>}

any suggestions on what to do instead?



أكثر...
 
أعلى