<html><head></head><body bgcolor="#FFFFFF"><div>Hi Ricardo,</div><div><br></div><div>No I think that makes sense. A solution would be to&nbsp;</div><div>A: get the pixel from the new center</div><div>B: add maybe 20 (or however much your left panel is big) to the x value so the center is moved further right.</div><div>C: then recenter using get lonlatfrompixel.</div><div><br></div><div>One big warning about this (and using pixels in general); this will all break when you use a screen with a different resolution.&nbsp;</div><div><br></div><div>Toby<br><br>On 22 Nov 2011, at 14:48, Ricardo Bayley &lt;<a href="mailto:ricardo.bayley@gmail.com">ricardo.bayley@gmail.com</a>&gt; wrote:<br><br></div><div></div><blockquote type="cite"><div><font size="2">Hi folks,</font><div><font size="2"><br></font></div><div><font size="2">I have 2 divs. One is a panel and the other is the map.</font></div><div>The panel slides to the left of my screen and gets hidden. So the map occupies the entire screen width.</div>
<div><br></div><div>If both divs are position one next to the other, every time the panel slides (opening &amp; closing) map div gets resized.&nbsp;</div><div>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.</div>
<div><br></div><div>This comes with a cost. When I do =&gt; map.setCenter(x,y) I would like to have it centered to the "visible center" of the map.</div><div>So when the panel is visible, the center should be shifted to x pixels to the right.</div>
<div><br></div><div>So basically, what I am &nbsp;looking for is to shift coords xpixels to the right.</div><div>Ideally it should work to with zoomToExtent.</div><div><br></div><div>Is it confusing ? How should I do this ?</div>
<div><br></div><div><br></div><div>warm regards.</div><div><br></div><div><br></div><div>Ricardo</div><div><br></div><div><br></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Users mailing list</span><br><span><a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a></span><br><span><a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a></span><br></div></blockquote></body></html>