Changeset 5626
- Timestamp:
- 01/02/08 14:27:14 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Layer/EventPane.js
r5614 r5626 240 240 !(newZoom == oldZoom) ) { 241 241 242 var center = this.getMapObjectLonLatFromOLLonLat(newCenter); 243 242 244 if (dragging && this.dragPanMapObject && 243 245 this.smoothDragPan) { … … 247 249 this.dragPanMapObject(dX, dY); 248 250 } else { 249 var center = this.getMapObjectLonLatFromOLLonLat(newCenter);250 251 var zoom = this.getMapObjectZoomFromOLZoom(newZoom); 251 252 this.setMapObjectCenter(center, zoom, dragging); … … 282 283 var moLonLat = this.getMapObjectLonLatFromMapObjectPixel(moPixel); 283 284 lonlat = this.getOLLonLatFromMapObjectLonLat(moLonLat); 284 var xrem = this.map.size.w % 2;285 var yrem = this.map.size.h % 2;286 if(xrem != 0 || yrem != 0) {287 // odd sized viewport288 var olPx = viewPortPx.add(xrem, yrem);289 var moPx = this.getMapObjectPixelFromOLPixel(olPx);290 var moLoc = this.getMapObjectLonLatFromMapObjectPixel(moPx);291 var olLoc = this.getOLLonLatFromMapObjectLonLat(moLoc);292 // adjust by half a pixel in odd dimension(s)293 lonlat.lon += (olLoc.lon - lonlat.lon) / 2;294 lonlat.lat += (olLoc.lat - lonlat.lat) / 2;295 }296 285 } 297 286 return lonlat;
