I am using react-google-maps/api for showing google map. I have used custom icon but it shows correctly in google map. But I want to show the image corner round in the map below like image:
I have used below code:
import React, { useEffect, useRef } from 'react'
import { GoogleMap, useJsApiLoader, Marker } from '@react-google-maps/api';
function AllMap({height}: any) {
const containerStyle = {
width: '100%',
height: height || '400px'
};
const center =
{ lat: 23.790076, lng: 90.419264};
const markerRef = useRef();
const { isLoaded } = useJsApiLoader({
id: 'google-map-script',
googleMapsApiKey: "mykey"
})
const [map, setMap] = React.useState(null)
const onLoad = React.useCallback(function callback(map: any) {
const bounds = new window.google.maps.LatLngBounds(center);
map.setZoom(18)
setMap(map)
}, [])
const onUnmount = React.useCallback(function callback(map: any) {
setMap(null)
}, [])
return isLoaded ? (
<GoogleMap
mapContainerStyle={containerStyle}
center={center}
zoom={10}
onLoad={onLoad}
onUnmount={onUnmount}
>
<>
<Marker position={center} title='City Bank IT Division' icon={{url: "/plant.png", scaledSize: new window.google.maps.Size(32, 32)}} ></Marker>
</>
</GoogleMap>
) : <></>
}
export default React.memo(AllMap)
How round the custom marker icon in map?
Please help me