A basic question on layers, sublayers, and cartodb.js

المشرف العام

Administrator
طاقم الإدارة
I am really new to cartodb and have spent a number of hours trying to figure out the distinction between layers and sublayers. Specifically within cartodb.js. For example, I have a map with two layers that I created using cartodb. I then use cartodb.createVis to get at it from javascript. Most things work, but to set an infowindow on a sublayer, I seem to have to do:layers[1].layers[1].sub.infowindow.set(stuff)

but, when I define the infowindow's template, only some of the template tags seem to be populated. Any ideas? In particular:1) Is there clear documentation somewhere on layers, sublayers, events, and infowindows somewhere?2) Is there any way within an infowindow to inspect {{content.data}} to find out what fields it actually has?

Thanks!!!



أكثر...
 
أعلى