Is there a way to detect when a user enters and exits StreetView in Google Maps under API v3?
I want to trigger an existing 'Hide Menu' function when the user enters StreetView (as the menu isn't relevant) and then re-show the menu when they exit.
Is there a way to detect when a user enters and exits StreetView in Google Maps under API v3?
I want to trigger an existing 'Hide Menu' function when the user enters StreetView (as the menu isn't relevant) and then re-show the menu when they exit.
Observe the
visible_changed
-event of the streetView, thevisible
-property will betrue
orfalse
(open or closed)You have to use the visible_changed event listener and also add a doAlert() function. This would enable the street view to make an alert on entry for the street view and also while exitting the street view.