إرفاق Kaleidr AI بخريطة Google
يتطلب مفتاح publishable بنطاق ai ضمن خطة Pro أو أعلى. يجب أن يكون
origin الخاص بصفحتك ضمن allowlist الخاصة بالمفتاح وأن يتم تقديم الصفحة عبر HTTP(S) — راجع
الحصول على مفتاح API.
<div id="mapHost" style="height:520px;position:relative">
<div id="map" style="position:absolute;inset:0"></div>
<div id="chat" style="position:absolute;inset:0;z-index:1;pointer-events:none"></div>
</div>
<script src="https://cdn.kaleidr.com/embed/v1/kaleidr.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_GOOGLE_KEY&callback=initMap&loading=async&v=weekly" async></script>
<script>
function initMap() {
const map = new google.maps.Map(document.getElementById('map'), {
center: { lat: 51.5, lng: -0.12 },
zoom: 11,
});
Kaleidr.mount('#chat', {
product: 'chat',
publishableKey: 'kld_pk_live_…',
map,
contained: true, // dock inside #chat, not on document.body
});
}
</script>
تكتشف حزمة chat Google Maps تلقائيًا وتعرض الأماكن التي تم تحديدها
كعلامات Google. تتم الفوترة ضمن نطاق ai. مفتاح Google Maps الخاص بك ومفتاح
Kaleidr منفصلان — Google تفرض رسومًا على map tiles، وKaleidr تفرض رسومًا على AI.