Google map with custom markers
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { AdvancedMarker, Pin } from "@vis.gl/react-google-maps";
|
||||
|
||||
interface IGMapMarker {
|
||||
key: string;
|
||||
location: google.maps.LatLngLiteral;
|
||||
children: React.ReactNode;
|
||||
}
|
||||
|
||||
export default function MapMarker({ key, location, children }: IGMapMarker) {
|
||||
return (
|
||||
<AdvancedMarker key={key} position={location}>
|
||||
<Pin
|
||||
background={"transparent"}
|
||||
glyphColor={"transparent"}
|
||||
borderColor={"transparent"}
|
||||
>
|
||||
{children}
|
||||
</Pin>
|
||||
</AdvancedMarker>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user