OpenLayers OpenLayers

Changeset 5626

Show
Ignore:
Timestamp:
01/02/08 14:27:14 (1 year ago)
Author:
crschmidt
Message:

Uncommit unrelated part of r5433.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Layer/EventPane.js

    r5614 r5626  
    240240                     !(newZoom == oldZoom) ) { 
    241241 
     242                    var center = this.getMapObjectLonLatFromOLLonLat(newCenter); 
     243 
    242244                    if (dragging && this.dragPanMapObject &&  
    243245                        this.smoothDragPan) { 
     
    247249                        this.dragPanMapObject(dX, dY); 
    248250                    } else { 
    249                         var center = this.getMapObjectLonLatFromOLLonLat(newCenter); 
    250251                        var zoom = this.getMapObjectZoomFromOLZoom(newZoom); 
    251252                        this.setMapObjectCenter(center, zoom, dragging); 
     
    282283            var moLonLat = this.getMapObjectLonLatFromMapObjectPixel(moPixel); 
    283284            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 viewport 
    288                 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             } 
    296285        } 
    297286        return lonlat;