# Turn Off Collisions Based on Zoom Level

When using the MapsIndoors SDK, the system for detecting collisions will sometimes, at high zoom levels, result in the Labels of POI's that are close together being hidden, no matter what you do. Here we present a small workaround, so you can disable collisions for specific zoom levels.

> Please note that on Web it is only possible to do this when using **Mapbox** as a map provider.

This is accomplished by checking if there is a `zoom_changed` event, and if there is, enabling or disabling the `text-allow-overlap` depending on the zoom levels.

```javascript
mapView.on('zoom_changed', () => {
    if (mi.getZoom() < mi.getMaxZoom() - 1) {
        mi.getMap().setLayoutProperty('MI_POINT_LAYER', 'text-allow-overlap', true);
    } else {
        mi.getMap().setLayoutProperty('MI_POINT_LAYER', 'text-allow-overlap', false);
    }
});
```

<br>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mapsindoors.com/sdks-and-frameworks/web/other-guides/turn-off-collisions-based-on-zoom-level.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
