I know Cartodb has the layer feature where you can create four different layers within one map, but is there a way to create more? I want my viewers to be able to choose between more than four layers in order to select which points they want to see, so is there a way to create more layers using html? Does someone have a template?

3 Answers 3


The number of layers in a CartoDB visualization is set according to your account. I'm not sure if there is a way to work around that with html.

With free accounts the limit is 4, with larger accounts you can request to have your account configured for more layers.

  • Where did you find this info, just out of curiosity?
    – AASIO
    Commented Mar 5, 2014 at 21:45
  • I work for CartoDB. But thinking about it, we don't have it published anywhere - will try to make that happen.
    – cholmes
    Commented Mar 7, 2014 at 20:22
  • See below for a workaround. Commented Nov 4, 2015 at 9:22

Yes the limit is 4 layers but you can pull in layers from other visualisations using cartoDB.js.

This Bushwick Community Map is a good example https://github.com/clhenrick/BushwickCommunityMap

On top of that you can use SQL to decide what should be shown. When I need to break the 4 layer limit I will usually add a points layer, lines layer and a polygon layer. I then add a column for table (which original table they came from) and then use SQL to select what I need.

For example in a recent project I had a threats layer (polygons) which had further subdivisions of 'logging' 'mining' 'oil' 'farming'. Each category had multiple polygons. So one layer became 4.

As always, the docs provide more info on this and if you would like more help please pm me.



this is not an answer but a follow up for more clarity.

We are currently on a trial version of John Snow and are still limited to 4 layers. As we are trying to decide about which plan best suits, it would be great to have a definitive answer soon.

For reference, we are not power users (will have less than 200Mb storage and less than 30 tables) but several of our vizualisations would benefit from having upwards of 20 layers. It's just the nature of the data and the sort of interaction we're needing to support.

How do things look at this point in time?

  • Hello CartoDB folk: could we hear back from you please? To clarify: we're talking about visualizations. The user interface currently allows a maximum of 4 layers that can be added to the layer switcher. Could you please explain if this is going to be a limitation for the foreseeable future, or is there a workaround? Our client is keen to get their 20 layers into the switcher. Can you provide guidance please? Commented Nov 19, 2014 at 8:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.