[OpenLayers-Users] Pan & markers issue
Shaw, Richard A
richard.shaw at atkinsglobal.com
Thu Nov 1 12:09:52 EDT 2007
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.
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.
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).
I'm using revision 4899.
Thanks
My line of code is -
originMarker.moveTo(backLayer.getViewPortPxFromLonLat(new OpenLayers.LonLat(newWgs84.longitude, newWgs84.latitude)));
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.
Richard Shaw
¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤
Richard Shaw
Technical Design Authority - Information Solutions Consultancy
Intelligent Transport Systems
Atkins Highways and Transportation
Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW
Tel: +44 (0) 1372 756407
Fax: +44 (0) 1372 740055
Mob: 07740 817586
E-mail: richard.shaw at atkinsglobal.com
www.atkinsglobal.com/its
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.
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.
Consider the environment. Please don't print this e-mail unless you really need to.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20071101/9ef4b176/attachment.html
More information about the Users
mailing list