var streeViewObject={
	pano : null,
	pano_service : null,
	radius : undefined,
	tencMap : null,
	open : function(lat,lng,direction,latlng_type_){//转换谷歌坐标为腾讯坐标  参数3为百度 5为谷歌
			streeViewObject.pano_service = new qq.maps.PanoramaService();	
			qq.maps.convertor.translate(new qq.maps.LatLng(lat,lng),latlng_type_,
				function(res){		
					streeViewObject.pano_service.getPano(res[0], streeViewObject.radius, function (result){           
						
							if(result == null){																
									$("#pano_container").show();
									$("#pano_image").show();
									$("#pano_text").show();
									
									if(streeViewObject.pano != null){
										streeViewObject.pano.setVisible(false);	
										streeViewObject.pano = null;
									}
							}else{
								$("#pano_image").hide();
								streeViewObject.initStyle(true);	
								if(streeViewObject.pano == null){
									streeViewObject.pano = new qq.maps.Panorama(document.getElementById('pano_container'), {// 创建街景——初始街景画面（由ID号取，可用坐标方法取）
															pano: result.svid,
															disableMove: false,																											
															disableFullScreen: true,
															pov:{
																heading:direction,
																pitch:0
															},
															zoom:1,
															visable: true
														});	
								}else{
									streeViewObject.pano.setPano(result.svid);
									//设置新街景的方向和水平视角
									streeViewObject.pano.setPov({heading : direction,pitch : 0});
									//由resultID取得街景																			
									streeViewObject.pano.setVisible(true);
								}																									
							}
       			 	});
			});
	},
	close : function(){
				
				streeViewObject.pano.setVisible(false);	
				
				streeViewObject.initStyle(false);
				
	},
	initTencMap : function (){
	
			/*
			streeViewObject.tencMap = new qq.maps.Map(document.getElementById("tencMap"),{
		        center:  new qq.maps.LatLng(lat,lng),
		        zoomLevel: 13
		    });
		    
			new qq.maps.PanoramaLayer().setMap(streeViewObject.tencMap);//设置路网图层——蓝色区域提示
			*/
			/*																	 
			streeViewObject.pano = new qq.maps.Panorama(document.getElementById('pano_container'), {// 创建街景——初始街景画面（由ID号取，可用坐标方法取）
				pano: '10051001111220105028000',
				disableMove: true,
				pov:{
					heading:20,
					pitch:15
				},
				zoom:1,
				visable: true
			});
			*/
			
			streeViewObject.pano_service = new qq.maps.PanoramaService();//pano service方法，添加click事件 点击路网 返回街景	
			
			
			/*
			qq.maps.event.addListener(streeViewObject.map, 'click', function (evt){
		            streeViewObject.pano_service.getPano(evt.latLng,streeViewObject.radius, function (result){
		                streeViewObject.pano.setPano(result.svid);
		            });
		    });*/
	},
	initStyle : function(isOpen){
		if(isOpen){
			//$("#pano_container").show();
			$("#pano_container").show();
			$("#close_stree").show();	
			
			if(mapType ==2 && map != undefined){
				google.maps.event.trigger(map, 'resize');
				//map.setZoom(13);
				//map.setCenter(new google.maps.LatLng(obj.lat, obj.lng));
				
			}else{
				//baidMap.setZoom(13);
				//baidMap.setCenter(new google.maps.LatLng(obj.lat, obj.lng));																							
			}
			
			
		}else{
				
				$("#pano_container").hide();
				$("#close_stree").hide();
			
		}
	}
}

