AlexBrand
AlexBrand

Reputation: 12401

Google Street View problem - javascript

I am having a problem with google street view. Basically, the street view is to be placed inside a hidden div. The div will be revealed when clicking on a button.

The street view loads fine the first time, but if I hide the div and then show it again, the street view window just shows a gray background.

You can check it out here: jsfiddle

Thanks!

Upvotes: 4

Views: 1214

Answers (1)

Ewout Kleinsmann
Ewout Kleinsmann

Reputation: 1297

This will fix it

$('#toggle').click(function() {
    $('#sv').toggle();
    google.maps.event.trigger(sv, 'resize')
});

jsfiddle

Upvotes: 5

Related Questions