Skip to main content

Attach Kaleidr AI to a Mapbox map

Attach the Control Tower to an existing Mapbox GL map.

<div id="map" style="height:520px"></div>
<div id="chat"></div>

<script src="https://api.mapbox.com/mapbox-gl-js/v3.0.0/mapbox-gl.js"></script>
<script src="https://cdn.kaleidr.com/embed/v1/kaleidr.js"></script>
<script>
mapboxgl.accessToken = 'pk.…';
const map = new mapboxgl.Map({ container: 'map', center: [-0.12, 51.5], zoom: 11 });

Kaleidr.mount('#chat', { product: 'chat', publishableKey: 'kld_pk_live_…', map });
</script>

The chat panel detects Mapbox automatically, plots resolved places as markers on your map, and frames the camera as the conversation moves. Bills the ai scope. See Chat attach.