import { useEffect, useRef } from 'react'; import { Map, View } from 'ol'; import TileLayer from 'ol/layer/Tile'; import { OSM } from 'ol/source'; import { fromLonLat } from 'ol/proj'; import './Map_page.css'; import Dock from './Dock'; // ✅ Make sure these are imported from 'react-icons/vsc' import { VscHome, VscArchive, VscAccount, VscSettingsGear } from 'react-icons/vsc'; const Map_page = () => { const mapRef = useRef(null); const mapDivRef = useRef(null); useEffect(() => { if (!mapRef.current) { const map = new Map({ target: mapDivRef.current as HTMLDivElement, layers: [new TileLayer({ source: new OSM() })], view: new View({ center: fromLonLat([-117.1611, 32.7157]), // Default to San Diego zoom: 10, }), }); mapRef.current = map; } }, []); const items = [ { icon: , label: 'Home', onClick: () => alert('Home!') }, { icon: , label: 'Archive', onClick: () => alert('Archive!') }, { icon: , label: 'Profile', onClick: () => alert('Profile!') }, { icon: , label: 'Settings', onClick: () => alert('Settings!') }, ]; return ( <>
); }; export default Map_page;