Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/design-patterns/2.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
更改导航属性gwt openlayers_Gwt_Properties_Navigation_Openlayers - Fatal编程技术网

更改导航属性gwt openlayers

更改导航属性gwt openlayers,gwt,properties,navigation,openlayers,Gwt,Properties,Navigation,Openlayers,在我的gwt应用程序中,我使用了gwt openlayers库。 要禁用导航控件,可以执行以下操作: Control control = getMap().getControlsByClass("OpenLayers.Control.Navigation"); control.deactivate(); 这将阻止缩放、双击、拖动等。 是否有任何方法可以阻止仅缩放(鼠标滚轮和双击)?鼠标滚轮上的缩放是一种可以更改的属性,如: NavigationOptions navOptions = new

在我的gwt应用程序中,我使用了gwt openlayers库。 要禁用导航控件,可以执行以下操作:

Control control = getMap().getControlsByClass("OpenLayers.Control.Navigation");
control.deactivate();
这将阻止缩放、双击、拖动等。
是否有任何方法可以阻止仅缩放(鼠标滚轮和双击)?

鼠标滚轮上的缩放是一种可以更改的属性,如:

NavigationOptions navOptions = new NavigationOptions();
navOptions.setZoomWheelEnabled(false);
但是我没有找到一种方法来阻止双击时的缩放

我通过调用以下命令来阻止缩放:

map.setMinMaxZoomLevel(minZoomLevel, maxZoomLevel)
并对minZoomLevel和maxZoomLevel应用相同的值