I would like to offset the map recentering by x number of pixels. How can I do this.

map.centerAt(point) - The argument takes a coordinates. However I would like to move the center 50 px to the left from real center.

I guess I could calculate the resolution of the pixel based on the current map scale and than calculate the distance I need to move the map. But I am wondering if there is a simpler way of panning the map by defining number of pixels, rather than the coordinates at which to center.

Thanks,

Martin

map.centerAt(point) - The argument takes a coordinates. However I would like to move the center 50 px to the left from real center.

I guess I could calculate the resolution of the pixel based on the current map scale and than calculate the distance I need to move the map. But I am wondering if there is a simpler way of panning the map by defining number of pixels, rather than the coordinates at which to center.

Thanks,

Martin

Here is my code, using Jquery selectors: