fullstackreact/google-maps-react

onRightClick not working on Marker

veljkocukic opened this issue · 0 comments

I'm making an app that uses this library and when I did this:

    const handleRightClickMarker = (e) => {
        alert("zfu")
    }

<Map google={window.google} zoom={14} onClick={handleClick} style={{ width: '100%', height: '100%', position: 'absolute' }}>
            {markers.map((item, key) => {
                let color = item.color ? `http://maps.google.com/mapfiles/ms/icons/${item.color}.png` : "http://maps.google.com/mapfiles/ms/icons/red.png"
                return <Marker key={key} position={{ lat: item.lat, lng: item.lng }} icon={color} onRightClick={handleRightClickMarker} />
            })}
        </Map>

Nothing happens when I do a right-click on a marker