Handle the marker click event correctly and set InfoWindow anchor when necessary.