views:

14

answers:

0

Hi-- I'm updating some v2 API code to work with the v3 API. For the most part it's way better. But I'm running into some issues with the panorama object.

Though the panorama object appears in the correct div, and all the copyright/controls appear, the window is blank (solid grey). Oddly the pano window shows the proper address for the geocode as well (the standard "Address is approximate" notice). However, if you attempt to use the panorama direction/zoom controls, it locks up and Firebug throws dozens of "Too Much Recursion" errors.

I've tried it several ways (the commented out lines below represent some other tactics that resulted in the same problem).

Any help appreciated!

window.addEvent('domready',function(){
            var panorama = new google.maps.StreetViewPanorama($("pano"));
            console.log("built pano"); // gets here no problem
            var client = new google.maps.StreetViewService();
            client.getPanoramaByLocation(coord, 25, function(result, status) {
                if (status == google.maps.StreetViewStatus.OK) {
                    //var panorama = new google.maps.StreetViewPanorama($("pano"));
                    //panorama.setPano(result.location.pano);
                    panorama.setOptions({
                        pano: result.location.pano
                    });

                    console.log(result.location.pano); // this also prints a valid pano
                }
            });
        });