Panoramic street view completely gray

I created a representation of the spine in the streets. The problem is that when shown, the panorama is completely gray. I'm not sure if this is due to the fact that it is inside the tab, and the panorama is displayed when the tab is opened.

I assume this could be a similar problem, which is fixed, causing the resize event to resize . Is there something similar that I could do?

 App.DetailStreetView = Backbone.View.extend({ initialize: function() { this.latLng = new google.maps.LatLng(37.869085,-122.254775); }, render: function() { var sv = new google.maps.StreetViewService(); this.panorama = new google.maps.StreetViewPanorama(this.el); sv.getPanoramaByLocation(this.latLng, 50, this.processSVData); }, processSVData: function(data, status) { if (status == google.maps.StreetViewStatus.OK) { // calculate correct heading for POV var heading = google.maps.geometry.spherical.computeHeading(data.location.latLng, this.latLng); this.panorama.setPano(data.location.pano); this.panorama.setPov({ heading: 270, pitch:0, zoom:1, }); } }, refresh: function() { this.panorama.setVisible(true); google.maps.event.trigger(this.panorama, 'resize'); } }); 

EDIT:

I created a JSFiddle that replicates the problem: http://jsfiddle.net/kNS2L/3/

+4
source share
1 answer

Yes, this is an old display:none with Maps and Panoramas. It works when I add setVisible(true) :

  $('button').click(function() { $('#pano').show(); panorama.setVisible(true); }); 
+5
source

All Articles