Street view bug ?

30 views
Skip to first unread message

Kurteknikk

unread,
Jun 25, 2010, 7:00:34 AM6/25/10
to Google Maps JavaScript API v3
Hi,

I managed to implement the context menu i had in API v2, and i've got
this streetViewShow() function. Basically all i do is get the clicked
position and show the street view.

Now my problem is that since i need the street view as a custom
control (so i won't show the markers) i'm hiding the map manually
using visibility: hidden, display: none when visible_changed is
detected.

My problem is that visible_changed is called twice for some reason. I
only do panorama.setVisible(true); once so visile_changed should be
triggered only once. I told you about how am i showing and hiding the
map & streetview because i'm suspecting that its triggering the
visible_changed from behind... But from what i read from the
documentation only pegman, close button click & setVisible() triggers
the visible_changed event...

Btw the result is that i get the street view show & hide immediately,
so i just see the street view kind of blink and get hidden again...
The set visible is being called is false, and never call
setVisible(false) apart from on initialization of the map... to
initially hide the street view.

Anyone had some similar experience ??

Chad Killingsworth

unread,
Jun 27, 2010, 8:34:49 AM6/27/10
to Google Maps JavaScript API v3
Have you tested to see if setting "display: none; visibility: hidden"
triggers the visible_changed event? If so, there's your second source
of the event.

If not, you'll need to post a link to your site so we can verify your
findings. See the posting guidelines.

Chad Killingsworth
Reply all
Reply to author
Forward
0 new messages