Change the event listener to: google.maps.event.addListener(streetView, 'visible_changed', doAlert);
That is no () after the function name. Your existing event listener will execute doAlert() when the event listener is defined and then NOT function as you want. Martin. On Dec 28, 6:29 pm, Steven Bell <[email protected]> wrote: > I want to trigger an event when the pegman is dropped onto the map and a > Street View panorama is selected. I'm trying to use the StreetViewPanorama > visible_changed event, but I'm not getting anywhere. > The code is athttp://www.botsnlinux.net/locationchooser.html > > I get an event when I load the page, which is acceptable, but I don't get an > event when I drop the pegman and go into Street View. Worse, I can't close > Street View and go back to the map. > > The Firefox error console shows an error > Error: f.e is undefined > Source File:http://maps.gstatic.com/intl/en_us/mapfiles/api-3/3/5/main.js > Line: 17 > > Chrome gives "Uncaught TypeError: Cannot call method 'apply' of undefined" > > What am I doing wrong? -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
