/** * Documentation Engine for Intaleq Dashboard * Comprehensive API Reference (EN/AR) * Updated with Premium Visuals & High-Performance Examples */ const docs = { init: () => { console.log('📚 Intaleq Documentation Module Init'); docs.bindEvents(); // Initial render based on existing active links or default const activeLink = document.querySelector('.docs-nav-link.active'); const section = activeLink ? activeLink.getAttribute('data-section') : 'getting-started'; docs.renderSection(section); }, bindEvents: () => { document.querySelectorAll('.docs-nav-link').forEach(link => { link.addEventListener('click', (e) => { e.preventDefault(); const section = e.currentTarget.getAttribute('data-section'); docs.renderSection(section); // Active state management document.querySelectorAll('.docs-nav-link').forEach(l => l.classList.remove('active', 'bg-blue-500/10', 'text-blue-400')); e.currentTarget.classList.add('active', 'bg-blue-500/10', 'text-blue-400'); }); }); }, renderSection: (id) => { const container = document.getElementById('docs-content'); if (!container) return; const lang = i18n.currentLang || 'en'; const isAr = lang === 'ar'; const content = { 'getting-started': `
${isAr ? 'مرحباً بك في مستقبل الخرائط في المنطقة. توفر لك منصة "انطلاق" واجهات برمجية ذكية، خرائط Vector فائقة الدقة، ومباني ثلاثية الأبعاد متكاملة.' : 'Welcome to the future of regional mapping. Intaleq provides high-fidelity vector tiles, intelligent geocoding, and native 3D building support for Jordan & Syria.'}
${isAr ? 'قم بإنشاء مفتاح API من لوحة التحكم لتفعيل طلباتك.' : 'Generate your secure API key from the dashboard to authenticate requests.'}
${isAr ? 'اختر النمط (Obsidian أو Light) وادمج الخريطة في تطبيقك.' : 'Select a theme and integrate the vector tiles using our GL styles.'}
${isAr ? 'استخدم خدمات البحث والتوجيه لإضافة ذكاء مكاني لتطبيقك.' : 'Leverage Geocoding and Routing APIs for advanced spatial intelligence.'}
https://map-saas.intaleq.com/api
${isAr ? 'طريقة المصادقة' : 'Auth Method'}
${isAr ? 'يتم إرسال المفتاح عبر الـ HTTP Header التالي:' : 'Pass your API key in the following HTTP header:'}
x-api-key
${isAr ? 'نطاق الوصول' : 'Allowed Origins'}
${isAr ? 'تأكد من إضافة النطاق الخاص بك في إعدادات المفتاح.' : 'Ensure your request origin is listed in the key restrictions.'}
Free
5 RPM
Starter
100 RPM
Pro
500 RPM
Enterprise
5000 RPM
${isAr ? 'خرائط تفاعلية فائقة السرعة تدعم العرض ثلاثي الأبعاد والتحكم الكامل في الخصائص.' : 'High-performance interactive maps with native 3D buildings and custom GL styles.'}
/v1/maps/style.json
theme
${isAr ? 'نمط الخريطة (light أو obsidian)' : 'Map visual theme (light | obsidian)'}
3d
${isAr ? 'تفعيل/إلغاء المباني ثلاثية الأبعاد' : 'Enable/Disable 3D buildings'}
const map = new maplibregl.Map({
container: 'map-id',
style: 'https://map-saas.intaleq.com/api/v1/maps/style.json?theme=obsidian',
transformRequest: (url) => {
return {
url: url,
headers: { 'x-api-key': 'YOUR_KEY_HERE' }
}
}
});
${isAr ? 'حوّل العناوين إلى إحداثيات أو العكس بدقة غير مسبوقة في الأردن وسوريا.' : 'Transform addresses into coordinates or reverse resolve locations with extreme accuracy in the Levant region.'}
/v1/geocoding/search
| ${isAr ? 'البارامتر' : 'Key'} | ${isAr ? 'الوصف' : 'Description'} |
|---|---|
| q | ${isAr ? 'نص البحث (مثلاً: "عمان، الجبيهة")' : 'Query string (e.g., "Amman, Jordan")'} |
| limit | ${isAr ? 'عدد النتائج (الافتراضي: 5)' : 'Max results limit'} |
curl "https://map-saas.intaleq.com/api/v1/geocoding/search?q=Amman" \\
-H "x-api-key: YOUR_SECURE_KEY"
[
{
"name": "Amman",
"name_ar": "عمان",
"lat": 31.9539,
"lng": 35.9106,
"district": "Capital",
"country": "Jordan",
"type": "city",
"boundingbox": [31.81, 32.07, 35.72, 36.14]
}
]
${isAr ? 'حساب أسرع المسارات مع تحليلات لحظية لحركة المرور في مراكز المدن.' : 'Fast pathfinding with traffic-aware duration metrics for urban environments.'}
/v1/routing/route
start
"35.91,31.95" (lng,lat)
end
"35.85,31.82" (lng,lat)
profile
car | bike | foot
alternatives
Boolean
{
"distance": 8420.5,
"duration": 940,
"traffic_duration": 1120,
"geometry": "encoded_polyline_here",
"steps": [
{ "instruction": "Turn right...", "distance": 200 }
]
}