I have a Carto map with two layers which I have linked using Carto's "Link Second Layer" analysis. I added a widget which lets me select the name of polygons and through this link, the map returns only the polygon selected by name and points (from the second layer) that fall inside it.

The issue is, I have data that extends all around the world. Currently, when I select a region the zoom does not change. Ideally, I'd want it to zoom to whatever polygon I've selected via the widget.

I found this: http://bl.ocks.org/oriolbx/1e3755a44583058f4b95 but it seems that this is for maps embedded on a site, how can I apply this same thing to a map inside Carto that I can share through a URL?

1 Answer 1


I'm afraid CARTO BUILDER does not allow to zoom automatically to the extent of features filtered by a widget. As you discovered, that kind of functionality is achievable by coding your own JavaScript solution (even it's not always a straightforward task) but it's not available at the BUILDER user interface.

Disclaimer: I work 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.