# Can we hide/show a Torque layer and/or set SQL?

Is it possible to select a Torque layer that is part of a visualization?

I am using CreateVis and creating button and layer selector so that the user can choose what appears on the map. However, the Torque layer do not act like the others sublayer and I cannot select it.

Is there a way to set SQL so that only part of the data are presented when a button is clicked for a Torque Layer, while having other "normal" layers on the map?

You can apply the torqueLayer.hide() and torqueLayer.show() methods to control the display of your Torque layer. There is also the torqueLayer.setSQL('...') option. With all of these, you need to make sure that your data is not set to private because these do not work with named maps unless you add some additional parameters to the config file.
A key thing to remember about Torque layers: they are their own layer as opposed to the static layers which consist of sublayers bundled into a single layer. The structure of layers which is returned as a callback object from createVis: layers[0] is the basemap layer, layers[1] are the static layers, and layers[2] is the Torque layer.
I made a working example here with some of the new heat maps! While this example does not use torqueLayer.setSQL('...') you can easily add it and customize it to your liking.