<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>Pan & markers issue</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT COLOR="#000000" SIZE=2 FACE="Courier New">I have a marker on a layer which the user can move. When the provide the new location I use moveTo to move the marker to the new location.</FONT></P>
<P><FONT COLOR="#000000" SIZE=2 FACE="Courier New">This works fine most of the time but on occasion it put the marke in the wrong place. Finally I discovered that it fails if the last thing I did to the map was pan. The marker is position out of place by the distance of the pan. If I zoom the map before moving the marker it puts it in the correct place.</FONT></P>
<P><FONT COLOR="#000000" SIZE=2 FACE="Courier New">Does anybody know if this has been fixed - or how to fix it (I've tried searching the openlayers trac but I can't find anything). </FONT></P>
<P><FONT COLOR="#000000" SIZE=2 FACE="Courier New">I'm using revision 4899.</FONT>
</P>
<P><FONT COLOR="#000000" SIZE=2 FACE="Courier New">Thanks</FONT>
</P>
<P><FONT COLOR="#000000" SIZE=2 FACE="Courier New">My line of code is -</FONT>
</P>
<P><FONT COLOR="#000000" SIZE=2 FACE="Courier New">originMarker.moveTo(backLayer.getViewPortPxFromLonLat(</FONT><FONT COLOR="#7F0055" SIZE=2 FACE="Courier New">new</FONT> <FONT COLOR="#000000" SIZE=2 FACE="Courier New">OpenLayers.LonLat(newWgs84.longitude, newWgs84.latitude)));</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Just about to send this and thought of something else. I get the position to move the marker to from the user clicking on the map with the following code. I thought it could be that the I need to adjust the e.xy by the offset of the layercontainerdiv before I convert the point to lat/lon but I added a display of the lat/lon and I get the same value before and after a pan, so it looks like the issue described above, but I'm having trouble trying to find where to put a fix.</FONT></P>
<P><FONT SIZE=2 FACE="Courier New">Richard Shaw</FONT>
</P>
<P><FONT SIZE=2 FACE="Courier New">¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤</FONT>
</P>
<P><B><FONT COLOR="#291948" SIZE=2 FACE="Arial">Richard Shaw</FONT></B><FONT COLOR="#291948" SIZE=2 FACE="Arial"> </FONT>
<BR><FONT COLOR="#291948" SIZE=2 FACE="Arial">Technical Design Authority - Information Solutions Consultancy </FONT>
<BR><FONT COLOR="#291948" SIZE=2 FACE="Arial">Intelligent Transport Systems </FONT>
</P>
<P><B><FONT COLOR="#291948" SIZE=2 FACE="Arial">Atkins</FONT></B><FONT COLOR="#291948" SIZE=2 FACE="Arial"> </FONT><B><FONT COLOR="#291948" SIZE=2 FACE="Arial">Highways and Transportation</FONT></B><FONT COLOR="#291948" SIZE=2 FACE="Arial"> </FONT>
<BR><FONT COLOR="#291948" SIZE=1 FACE="Arial">Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW</FONT>
</P>
<P><FONT COLOR="#291948" SIZE=1 FACE="Arial">Tel: +44 (0) 1372 756407 </FONT>
<BR><FONT COLOR="#291948" SIZE=1 FACE="Arial">Fax: +44 (0) 1372 740055</FONT>
<BR><FONT COLOR="#291948" SIZE=1 FACE="Arial">Mob: 07740 817586 </FONT>
<BR><FONT COLOR="#291948" SIZE=1 FACE="Arial">E-mail: richard.shaw@atkinsglobal.com</FONT>
</P>
<P><A HREF="http://www.atkinsglobal.com/its"><U><FONT COLOR="#756FB2" SIZE=1 FACE="Arial">www.atkinsglobal.com/its</FONT></U></A>
</P>
<br><br>
<CENTER><FONT face="Arial, Helvetica, sans-serif" size=2><B>This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding.</B></FONT>
<P><FONT face="Arial, Helvetica, sans-serif" size=2>The ultimate parent company of the Atkins Group is WS Atkins plc. Registered in England No. 1885586. Registered Office Woodcote Grove, Ashley Road, Epsom, Surrey KT18 5BW.</FONT>
<P><FONT face=Webdings color=green size=5>P</FONT> <FONT face="Arial, Helvetica, sans-serif" color=green size=2><B>Consider the environment. Please don't print this e-mail unless you really need to.</B></FONT> </CENTER></P>
</body>
</HTML>