/** * Documentation Engine for Intaleq Dashboard */ const docs = { init: () => { console.log('📚 Initializing Documentation...'); docs.bindEvents(); docs.renderSection('getting-started'); }, bindEvents: () => { // Handle side-nav clicks 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 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; // Content repository const content = { 'getting-started': `

Getting Started

Welcome to the Intaleq Map Platform. Our APIs allow you to integrate high-quality vector maps, geocoding, and routing into your web and mobile applications with ease.

1. Get an API Key

Go to the Credentials page and create your first API key.

2. Install SDK

Use our MapLibre wrappers for JavaScript or Flutter.

Base URL

https://map-dashbord.intaleqapp.com/api
`, 'tiles-api': `

Vector Tiles API

Render high-performance vector maps from our global database.

GET /maps/style.json

Returns the MapLibre-compatible style configuration. Use the theme parameter to switch between 'light' and 'obsidian'.

Code Example
// Initialize MapLibre with Intaleq Style
const map = new maplibregl.Map({
    container: 'map',
    style: 'https://map-dashbord.intaleqapp.com/api/maps/style.json?theme=obsidian',
    center: [35.9106, 31.9539], // Amman
    zoom: 12
});
`, 'geocoding-api': `

Geocoding API

Convert addresses to coordinates (Forward) or coordinates to addresses (Reverse).

GET /geocoding/search
Parameter Type Description
q string Search query (address, place, coordinates)
limit number Max results (default: 5)
Request
curl "https://map-dashbord.intaleqapp.com/api/geocoding/search?q=Amman&limit=1" \\
     -H "x-api-key: YOUR_API_KEY"
` }; container.innerHTML = content[id] || '

Documentation section coming soon...

'; lucide.createIcons(); } };