开发者

how to close/toggle visibility of the street view in a custom google map API v3?

i bui开发者_开发知识库lt a custom map using google api v3, and I allow my users to use the streetview feature, but i would be able to close it and go back to the regular map by clicking a button (not he X within th emap but my own button)...what's the command to do that? i cant find it in the docs


Try putting this under the pageLoad()

$("#streetview_click").appendTo("#map_canvas");

// google streetmap [top bar (north) ]
$("#streetview_click").click(function(){
    var panorama = map.getStreetView();
    if(panorama){panorama.setVisible(false);}
});

for more information about streetview script functions check this topic on Google groups: http://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/d87b18de3a096b8d/b56a04a0440f5016?lnk=gst&q=streetview+close+button#b56a04a0440f5016

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜