[OpenLayers-Users] SetCenter

Ricardo Bayley ricardo.bayley at gmail.com
Tue Nov 22 09:48:35 EST 2011


Hi folks,

I have 2 divs. One is a panel and the other is the map.
The panel slides to the left of my screen and gets hidden. So the map
occupies the entire screen width.

If both divs are position one next to the other, every time the panel
slides (opening & closing) map div gets resized.
Since I dont like the effect it causes I made by div panel to lay on top of
the map and not next to it. So every time the panel gets hidden or shown,
map doesnt change at all.

This comes with a cost. When I do => map.setCenter(x,y) I would like to
have it centered to the "visible center" of the map.
So when the panel is visible, the center should be shifted to x pixels to
the right.

So basically, what I am  looking for is to shift coords xpixels to the
right.
Ideally it should work to with zoomToExtent.

Is it confusing ? How should I do this ?


warm regards.


Ricardo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20111122/5325d3ca/attachment.html


More information about the Users mailing list