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);
|
var center = this.getMapObjectLonLatFromOLLonLat(newCenter);
|
||||||
|
|
||||||
if (dragging && this.dragPanMapObject) {
|
if (dragging && this.dragPanMapObject) {
|
||||||
var res = this.map.resolution; //readability
|
var resolution = this.map.getResolution();
|
||||||
var dX = (newCenter.lon - oldCenter.lon) / res;
|
var dX = (newCenter.lon - oldCenter.lon) / resolution;
|
||||||
var dY = (newCenter.lat - oldCenter.lat) / res;
|
var dY = (newCenter.lat - oldCenter.lat) / resolution;
|
||||||
this.dragPanMapObject(dX, dY);
|
this.dragPanMapObject(dX, dY);
|
||||||
} else {
|
} else {
|
||||||
var zoom = this.getMapObjectZoomFromOLZoom(newZoom);
|
var zoom = this.getMapObjectZoomFromOLZoom(newZoom);
|
||||||
|
|||||||
Reference in New Issue
Block a user