开发者

Google Street View problem - javascript

开发者 https://www.devze.com 2023-03-22 09:38 出处:网络
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.

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 back开发者_JAVA百科ground.

You can check it out here: jsfiddle

Thanks!


This will fix it

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

jsfiddle

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号