get resolution from map via the accessor instead of directly from the property. (Closes #1162)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5226 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -227,9 +227,9 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, {
|
||||
var center = this.getMapObjectLonLatFromOLLonLat(newCenter);
|
||||
|
||||
if (dragging && this.dragPanMapObject) {
|
||||
var res = this.map.resolution; //readability
|
||||
var dX = (newCenter.lon - oldCenter.lon) / res;
|
||||
var dY = (newCenter.lat - oldCenter.lat) / res;
|
||||
var resolution = this.map.getResolution();
|
||||
var dX = (newCenter.lon - oldCenter.lon) / resolution;
|
||||
var dY = (newCenter.lat - oldCenter.lat) / resolution;
|
||||
this.dragPanMapObject(dX, dY);
|
||||
} else {
|
||||
var zoom = this.getMapObjectZoomFromOLZoom(newZoom);
|
||||
|
||||
Reference in New Issue
Block a user