> For the complete documentation index, see [llms.txt](https://docs.carto.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.carto.com/carto-user-manual/maps/layers/zoom-to-layer.md).

# Zoom to layer

You can use the Zoom to layer functionality in Builder to zoom your map to display all the features of a layer. This helps you quickly locate your layer, speeding up your exploration journey.

<figure><img src="https://3029946802-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FybPdpmLltPkzGFvz7m8A%2Fuploads%2Fgit-blob-a5f179f0e1cdd7c384a28314fbe0e895ef336d89%2FZoomToGif.gif?alt=media" alt=""><figcaption></figcaption></figure>

## **Accessing zoom to layer**

The Zoom to Layer feature can be accessed from the Layer Card and Layer Panel for Editors, and from the legend for both Editors and Viewers.

<figure><img src="https://3029946802-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FybPdpmLltPkzGFvz7m8A%2Fuploads%2Fgit-blob-e9505dc73a66e5e30be9b8cd2b5ae5e2aae58964%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

\
If your layer features have been filtered by Widgets or SQL Parameters, the zoom will always account for this filtering, allowing you to easily focus on the selected features.

{% hint style="info" %}
**Limitations**

Please note that Zoom to layer is not supported for H3 spatial indexes in **PostgreSQL** and **Redshift**. Additionally, it is not supported for **Databricks** sources.

Zooming to layers linked to **spatial index sources** (H3 or Grid) and **pre-generated tileset** sources won't take into account the widget filtering status.

When a **parameter control combination** does not return any values, the Zoom to layer functionality will not work and will return an error message.
{% endhint %}

## Switching layer visibility

The eye icon in the Layer Card, Layer Panel, and Legend allows users to easily toggle layers on or off. For maps with many layers, the "Show only this/Show all layers" functionality is particularly useful. It enables you to switch off all other layers or make them all visible if only one layer is currently displayed.

<figure><img src="https://3029946802-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FybPdpmLltPkzGFvz7m8A%2Fuploads%2Fgit-blob-fdff91456b4f8f2da414439aad6dd8aff99c1fbd%2FShowOnlyThis.gif?alt=media" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.carto.com/carto-user-manual/maps/layers/zoom-to-layer.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
