{.section-title.accent.text-primary} # API Reference - [Navigation functions](api-nav.md) - [Chat functions](api-chat.md) ### Detecting when the user enters/leaves a zone ``` onEnterZone(name: string, callback: () => void): void onLeaveZone(name: string, callback: () => void): void ``` Listens to the position of the current user. The event is triggered when the user enters or leaves a given zone. The name of the zone is stored in the map, on a dedicated layer with the `zone` property.