Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/445.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 谷歌地图赢得';t形垂直跨度_Javascript_Google Maps - Fatal编程技术网

Javascript 谷歌地图赢得';t形垂直跨度

Javascript 谷歌地图赢得';t形垂直跨度,javascript,google-maps,Javascript,Google Maps,我在单击标记时执行了这段代码。除了地图不会在垂直方向上跨越(它在水平方向上跨越)之外,所有的工作都很好 这是我的代码(javascript) google.maps.event.addListener(标记,'click',函数(){ infoBox.setContent(“”+this.image+“”+this.title+“”+this.type+”,表示“+this.type2+”-“+this.price+”); 打开(地图,这个); 地图设置中心(此位置); 潘比地图(380110)

我在单击标记时执行了这段代码。除了地图不会在垂直方向上跨越(它在水平方向上跨越)之外,所有的工作都很好

这是我的代码(javascript)

google.maps.event.addListener(标记,'click',函数(){
infoBox.setContent(“”+this.image+“”+this.title+“”+this.type+”,表示“+this.type2+”-“+this.price+”);
打开(地图,这个);
地图设置中心(此位置);
潘比地图(380110);
});

将信息框的
disableAutoPan
-选项设置为
true
,否则调用
panBy()
将与信息框的自动平移竞争

 google.maps.event.addListener(marker, 'click', function() {
   infoBox.setContent('<div class="info_details">'+this.image+' <h2>'+this.title+'</h2> <div class="prop_details">'+this.type+' for '+this.type2+' - '+this.price+'</div>' );
   infoBox.open(map, this);    
   map.setCenter(this.position);      
   map.panBy(380,110);
 });