How do I know when the google map is in streetview mode or roadmap mode? Is there an event that gets fired? I tried looking through the docs, and there doesn’t seem to be anything. Am I missing something?
When the user switches into streetview mode, I want the UI to change, but I don’t know which event to bind to.
Detect the
visible_changedevent on theStreetViewPanoramaassociated with yourMapobject. You can get the panorama from the map by calling itsgetStreetView()method and bind the handler to that object’s event. You will have to test theStreetViewPanorama‘s visibility by calling itsgetVisible()method.For instance:
See the events section of the StreetViewPanorama Object Documentation for more events you can listen for on this object.