Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/google-maps/4.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
Google maps 不要开火';缩放已更改';使用fitbounds()时发生的事件_Google Maps_Zooming_Fitbounds - Fatal编程技术网

Google maps 不要开火';缩放已更改';使用fitbounds()时发生的事件

Google maps 不要开火';缩放已更改';使用fitbounds()时发生的事件,google-maps,zooming,fitbounds,Google Maps,Zooming,Fitbounds,在我的初始阶段,我有一些类似的东西 google.maps.event.addListener(gmap, 'zoom_changed', function(){ GMapPlot.getSwNe(window.gmap.getBounds()); //GMapPlot.rePlotMap(presentPlaceType); }); 在某种程度上,我有gmap.fitBounds(GMapPlot.markerBounds),我的问题是,fitBounds引发intern调用

在我的初始阶段,我有一些类似的东西

google.maps.event.addListener(gmap, 'zoom_changed', function(){
    GMapPlot.getSwNe(window.gmap.getBounds());
    //GMapPlot.rePlotMap(presentPlaceType);
});

在某种程度上,我有
gmap.fitBounds(GMapPlot.markerBounds)
,我的问题是,
fitBounds
引发intern调用绑定方法的
zoom\u changed
事件,我不希望发生这种情况,有没有办法做到这一点。如果我尝试
clearListener
for
zoom\u在
fitBounds
不起作用之前更改了事件。

找到答案了吗?