import React from 'react'; import { Map } from '../ui/map'; import { RouteMap } from '../ui/route-map'; export function ApiKeyMapExample() { const [key, setKey] = React.useState(''); const [appliedKey, setAppliedKey] = React.useState(''); const handleApply = () => { if (key) setAppliedKey(key); }; return (
Enter a Google Maps API Key to load the maps below. This simulates a scenario where the key is provided dynamically or via props, overriding/fallback for the global context.