1

Currently, I have a web map with multiple layers.

I would like the final user to be able to select one layer can be turned on at a time.

Currently, multiple layers can be turned on, but only the layer on top is visible.

1

If you made your map with CARTO Builder, you can toggle the layer selector in the Map Options. However, this won't act exactly like a radio button (more than one layer can be selected at the same time). Here's a GIF showing how:

enter image description here

If you wish to make a custom radio button, you can do so by building your map from scratch using CARTO.js. However, some knowledge of JavaScript will be required.

Here's an example by Jorge Sanz making a custom layer selector with CARTO.js.

Note: I'm currently working at CARTO.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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