import { Button } from '@mui/material'; import { LoadScriptNext, GoogleMap, Marker, OverlayView } from '@react-google-maps/api'; const containerStyle = { width: '100%', height: 'calc(100vh - 150px)' }; export default function RiderLocationMap({ riderLocations }) { console.log('riderLocations', riderLocations); const center = { lat: Number(riderLocations?.[0]?.latitude || 11.0056), lng: Number(riderLocations?.[0]?.longitude || 76.9661) }; const GreenIcon = { url: 'https://cdn.rawgit.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-green.png', scaledSize: new window.google.maps.Size(25, 41), anchor: new window.google.maps.Point(12, 41) }; const RedIcon = { url: 'https://cdn.rawgit.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-red.png', scaledSize: new window.google.maps.Size(25, 41), anchor: new window.google.maps.Point(12, 41) }; return ( {riderLocations && riderLocations?.map((r, index) => { const lat = Number(r.latitude); const lng = Number(r.longitude); return (
{/* Marker */}
); })}
); }