CloudMade/Leaflet — Issue #338: Map Refresh Issue L.Circle setLatLng on Android
Author: tfechner
Created: 2011-10-20 14:30:59+00:00
State: open

I have been playing around with the draggable marker and a corresponding circles.
I wanted to display a "buffer" around the marker. To achieve this i am setting the position of the circle on the drag event of the marker.
The circle stays nicely with the marker for Firefox 7.0.1 and Chrome 14.0.835.202 m but it fails in the stock browsers of Android 2.2.1 and 2.3.2.
Although the position is updated the map does not get refreshed properly. While dragging the marker it creates a lot of artifacts (the old marker positions). When the map is panned it refreshes properly and the artifacts vanish.

In addition to that:
I was only able to get the draggable marker to work on the androids when i disabled the draggability of the markers while the map was panning. If this is not done the marker is dragged as well and shifts its position.
This is probably due to to the fact that both the map and the marker listen to touchevents and try to update their positions. I'd propose that marker draggability is disabled by default while the map is panning.
You can check out an example here : http://jsfiddle.net/s3n3ca/24sdR/5/

Anyway - great library !