[OpenLayers-Users] double clicking doesn't recenter map anymore
Arnd Wippermann
arnd.wippermann at web.de
Sun Mar 9 11:20:41 PDT 2014
Hi,
from the OL 2.13.1 code (Map.js zoomTo) i would think, the map should center
on the click location. But it does not.
You can switch to the defaultDblClick from OL 2.12.
OL 2.12
---------
OpenLayers.Control.Navigation.prototype.defaultDblClick = function (evt) {
var newCenter = this.map.getLonLatFromViewPortPx( evt.xy );
this.map.setCenter(newCenter, this.map.zoom + 1);
};
OL 2.13.1
---------
OpenLayers.Control.Navigation.prototype.defaultDblClick = function (evt) {
this.map.zoomTo(this.map.zoom + 1, evt.xy);
};
Arnd
_____
Von: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von
Steve.Toutant at inspq.qc.ca
Gesendet: Freitag, 7. März 2014 20:51
An: openlayers-users at lists.osgeo.org
Betreff: [OpenLayers-Users] double clicking doesn't recenter map anymore
With Ol2.10, double clicking on the map used to zoom in and the location I
double clicked became the center of the map
With 2.13 it doesn't
is there a new parameter I need to use in 2.13? How can I get back the old
behavior?
thanks
steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20140309/8d3533e2/attachment.html>
More information about the Users
mailing list