// Configuration - Replace with your API keys or run in demo mode const CONFIG = { DEMO_MODE: true, MAP_TILES_KEY: 'pk.yourmapboxkeyhere', GEOCODING_KEY: 'yourgeocodingkeyhere', ROUTING_KEY: 'yourroutingkeyhere', TRAFFIC_KEY: 'yourtraffickeyhere', WEATHER_KEY: 'yourweatherapikeyhere', DEFAULT_MIATA_COLOR: '#EF4444', // Tailwind red-500 OFFLINE_REGIONS: ['ontario'], // Default offline regions REROUTE_THRESHOLD: 5, // minutes ROUTE_PREFERENCES: { avoidTolls: false, avoidHighways: false, avoidFerries: true, preferScenic: false } }; // Voice Commands System class VoiceNavigation { constructor() { this.commands = { 'take me home': () => this.navigateTo('home'), 'add stop for gas': () => this.addStop('gas station'), 'avoid highways': () => this.setPreference('avoidHighways', true), 'find coffee': () => this.searchAlongRoute('coffee'), 'mute guidance': () => this.toggleVoice(false) }; } processCommand(command) { const handler = this.commands[command.toLowerCase()]; if (handler) handler(); } // Command implementations would go here // (Actual implementations would interact with routing system) } // Demo Map Initialization function initDemoMap() { if (CONFIG.DEMO_MODE) { // Mock map initialization for demo purposes document.getElementById('map').innerHTML = `