# URL parameters

URL parameters provide a versatile way to dynamically customize the presentation of your Builder map in viewer mode, enabling you to create tailored views for specific audiences without the need to create and manage multiple duplicated maps.

## Using URL Parameters

### **Automatic interaction**

When interacting with the viewer mode of a Builder map, any changes made are automatically reflected in the URL. For instance, if you use the [Search location bar](https://docs.carto.com/carto-user-manual/maps/search-locations) to find a specific address, the location will automatically be appended to the URL parameter, as shown in this example:

```html
https://clausa.app.carto.com/map/5d942679-411f-4ab7-afb7-0f6061c9af63?search=New+York
```

### Manual addition

You can manually add URL parameters to customize the behavior of your map in viewer mode. To manually include URL parameters, follow these guidelines, along with the [parameter table referencer](#parameter-reference):

* Use the '&' symbol to separate multiple parameters.
* The first parameter should start with a '?' symbol.
* Replace spaces in the URL with plus signs '+'.
* Utilize encoded formatting, such as %28 and %29 for parentheses or %2C for commas, when needed.

{% hint style="warning" %}
**Limit Considerations**

* **URL Length:** The URL of the map has a limit of 2083 characters. Exceeding this limit may result in the removal of parameters from the URL. Keep your URL within this limit for desired map settings.
* **Time Series Widget:** URL parameters do not support the Time Series Widget settings.
* **Parameter Validation:** Ensure correct parameter formatting and validity. Invalid or meaningless parameters will be ignored by the map.
* **Edit Mode:** Parameters are only accepted when viewing the map either automatically or by manual input. Please note that any additions of parameters in the map URL editor mode will be ignored.
  {% endhint %}

## Parameter Reference

Refer to the table below for detailed information about each parameter that can be included in the URL to customize your map.

<table data-full-width="true"><thead><tr><th width="238">Parameter</th><th width="589">Description</th></tr></thead><tbody><tr><td><code>lat</code> / <code>lng</code></td><td><p>Sets the center of the map.</p><p>Syntax rules:</p><ul><li><code>lat</code> specifies the latitude</li><li><code>lng</code> specifies the longitude of the map's center.</li><li>Values should be in decimal degrees</li></ul><p>Example:</p><p><code>lat=27.731667&#x26;lng=-81.346962</code></p></td></tr><tr><td><code>zoom</code></td><td><p>Defines the zoom level of the map, controlling the scale of the view. Higher values zoom in closer to the surface.</p><p>Example:</p><p><code>zoom=10</code></p></td></tr><tr><td><code>mask</code></td><td><p>Defines a geographic area to filter map layers and widgets using a polygon.</p><p>Syntax rules:</p><ul><li>Must be in WKT POLYGON format.</li><li>Use <code>%28</code> and <code>%29</code> for parentheses.</li><li>Use <code>%2C</code> for commas.</li><li><code>+</code> for spaces between coordinates.</li></ul><p>Example:</p><p><code>mask=POLYGON+%28%28-2.601981+51.452270%2C+-2.601877+51.450410%2C+-2.594073+51.450319%2C+-2.594632+51.452358%2C+-2.601981+51.452270%29%29</code></p></td></tr><tr><td><code>search</code></td><td><p>Allows searching for a coordinate or address. When used, it centers the map on the specified location, updates the Search location bar, and places a marker icon at the location.</p><p>Syntax rules:</p><ul><li>Coordinates must be in decimal degrees format.</li><li>Use <code>+</code> to replace spaces within an address or between coordinate values.</li><li>Use <code>%2C</code> to separate latitude and longitude values in coordinates.</li></ul><p>Examples:</p><ul><li>Address: <code>search=broadway+new+york</code></li><li>Coordinates: <code>search=40.790886%2C+-73.974709</code></li></ul></td></tr><tr><td><code>widget_[widget_id]</code></td><td><p>Applies filters to widgets in the map. The unique <code>widget_id</code> can be obtained using the "Copy ID" functionality available on each widget on Editor mode.</p><p>Syntax rule:</p><ul><li>Replace <code>[widget_id]</code> with the widget's actual ID.</li><li>Use <code>+</code> to indicate spaces within concatenated filter values.</li><li>Use <code>%2C</code> to separate different filter ranges for Histogram widget.</li><li>Time Series widgets is not supported by URL parameters.</li></ul><p>Example:</p><ul><li>Pie Widget: <code>widget_5c7eb73e-5e2f-4639-90af-1b82b80a1969=Department+Store</code></li><li>Histogram: <code>widget_6a1a3172-1bc2-49be-89a8-c1b008f4e43e=1413506.6-1526970.5</code></li></ul></td></tr><tr><td><code>param_[sql_name]</code></td><td><p>Update the input values in SQL Parameter Controls updating the parameters applied in your SQL query sources.</p><p>Syntax rules:</p><ul><li>Substitute <code>[sql_name]</code> with the actual name SQL name of the parameter without brackets.</li><li>Encode spaces within text values with <code>+</code>.</li><li>Format date values as <code>YYYY-MM-DD</code>.</li><li>Encode dashes <code>-</code> in numeric ranges with <code>%2D</code> for specifying value intervals.</li></ul><p><br>Example:</p><ul><li>Date Parameter: <code>param_event_date_from=2017-01-03&#x26;param_event_date_to=2017-01-11</code></li><li>Numeric Parameter <code>param_accident_influence_radius=70</code></li><li>Text Parameter: <code>param_route_type=Popular+Busier+Roads</code></li></ul></td></tr><tr><td><code>layers</code></td><td><p>Specify which layers are visible in the map.</p><p>Syntax rule:</p><ul><li>List the indices of the visible layers separated by commas without spaces.</li><li>Each index corresponds to a layer's position in the Builder, starting from <code>0</code>.</li></ul><p>Example:</p><p><code>layers=0,1</code></p></td></tr><tr><td><code>pitch</code></td><td><p>Adjusts the vertical angle of the map view in degrees, enhancing the perspective or 3D visualization effect.</p><p>Syntax rule:</p><ul><li>The value can range from <code>0</code> (orthogonal view, directly above) to <code>60</code> degrees (tilted view, providing depth and perspective).</li></ul><p>Example:</p><p><code>pitch=35</code></p></td></tr><tr><td><code>bearing</code></td><td><p>Adjusts the horizontal angle or bearing of the map view, specifying the orientation with respect to the cardinal directions.</p><p>Syntax rule:</p><ul><li>The value is provided in degrees, measured clockwise, with North as <code>0</code> degrees, East as <code>90</code> degrees, South as <code>180</code> degrees, and West as <code>270</code> degrees.</li></ul><p>Example:</p><p><code>bearing=180</code></p></td></tr></tbody></table>
