Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
Needs more info comment that > 10 days [ID: 963198]
Comment such as: SPAM, non-actionable [ID: 963127]
Resolved actionable follow-up comments [ID: 963027]
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
I'm sure this was not the case a few days ago. Sample page below to reproduce the problem. Changing the setVisible(false) to be before the listener is defined makes no difference.
<html>
<head>
<script type="text/javascript" src="
<script type="text/javascript">
var paris;
var map;
function initialize() {
paris = new google.maps.LatLng(48.85661, 2.35077);
var mapOptions = {
zoom: 8,
center: paris,
scaleControl: true,
streetViewControl: true,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
var panoramaOptions = {
enableCloseButton: true
};
panorama = new google.maps.StreetViewPanorama(document.getElementById("pano"),panoramaOptions); //Create the main Street View Panorama object.
map.setStreetView(panorama); //bind it to the map to override the default one.
google.maps.event.addListener(panorama,'visible_changed',function() {
alert("listener fired");
});
panorama.setVisible(false);
}
</script>
</head>
<body onload="initialize()">
<div id="pano" style="width:100%; height:300px; top:0px;"></div>
<div id="map_canvas" style="width:100%; height:300px;"></div>
</body>
</html>