I am trying to open a pop over when a google map shape is clicked
but i am unable to do that
I have tried this method which i am usually using to open a pop up when a button is clicked
But it is not working
Below is my code
{polygon !== null &&
polygon.map((poly, index) => (
<Popover
placement="top"
content={() =>
content(poly)}
trigger="click"
className="crime-marker"
>
{" "}
<Polygon
ref={(ref) =>
{
_polyRef(ref);
}}
paths={poly.coord}
onClick={(value) => console.log(poly)}
onMouseDown={() => {
_onMousedown(index);
}}
/>
</Popover>
))}
Can somebody help me with this?