function initialize() { // Set up Street View and initially set it visible. Register the // custom panorama provider function. Set the StreetView to display // the custom panorama 'reception' which we check for below. var panoOptions = { pano: 'redacao', panoProvider: getCustomPanorama, linksControl: false, panControl: true, zoomControl: false, enableCloseButton: false, }; var panorama = new google.maps.StreetViewPanorama( document.getElementById('map-canvas'), panoOptions); } // Return a pano image given the panoID. function getCustomPanoramaTileUrl(pano, zoom, tileX, tileY) { // Note: robust custom panorama methods would require tiled pano data. // Here we're just using a single tile, set to the tile size and equal // to the pano "world" size. return 'http://sgw.a8se.com/storage/conteudo/2/37496/20140121173859_52dedae35c9d7.jpg'; } // Construct the appropriate StreetViewPanoramaData given // the passed pano IDs. function getCustomPanorama(pano, zoom, tileX, tileY) { if (pano == 'redacao') { return { location: { pano: 'redacao', description: 'Redação - TV Atalaia' }, links: [], // The text for the copyright control. copyright: '@dnemo', // The definition of the tiles for this panorama. tiles: { tileSize: new google.maps.Size(4976, 1024), worldSize: new google.maps.Size(4976, 1024), // The heading in degrees at the origin of the panorama // tile set. centerHeading: 105, getTileUrl: getCustomPanoramaTileUrl } }; } } google.maps.event.addDomListener(window, 'load', initialize);