Hi, For OL2 try:
var navCtl = new OpenLayers.Control.Navigation(); map.addControl(navCtl); // this must be written before the tricks!! // Trick for pan var evtTrick = function (evt) { evt.xy = new OpenLayers.Pixel(evt.xy.x, this.last.y); }; var navCtlPanHnd = navCtl.dragPan.handler; navCtlPanHnd.move = evtTrick; navCtlPanHnd.up = evtTrick; navCtlPanHnd.out = evtTrick; // Trick for zoom var evtTrick2 = function (evt) { evt.xy = new OpenLayers.Pixel(this.last.x, evt.xy.y); }; var navCtlZboxHnd = navCtl.zoomBox.handler.dragHandler; navCtlZboxHnd.move = evtTrick2; navCtlZboxHnd.up = evtTrick2; navCtlZboxHnd.out = evtTrick2; regards, lenoil wrote > Hi, > > OL2 : Openlayers 2 > OL3 : Openlayers 3 > it possible to disabled the move in Y or in Y ? OL2 or OL3 ? > Is it possible to zoom only on the X, only on the Y ? OL2 or OL3 ? > > Thanks for your help because I 'm lost -- View this message in context: http://osgeo-org.1560.x6.nabble.com/disabled-move-in-Y-tp5099809p5103256.html Sent from the OpenLayers Dev mailing list archive at Nabble.com. _______________________________________________ Dev mailing list d...@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-dev