My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 4052: Bug: Markers with 'map' property set to null after a drag & drop cannot be shown anymore
8 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  [email protected]
Closed:  Apr 2012


Sign in to add a comment
 
Reported by [email protected], Apr 4, 2012
Observed in every browser I tested, with the last API version.

Steps to reproduce:
 - Create a Map '_map' and add a draggable Marker on it
 - Drag the marker and drop it to a new position
 - setMap(null) on the marker -> it disappears, as it should
 - setMap(_map) on the marker -> it should reappear, but it doesn't

I reproduced this bug only on dragged markers.
When using the 'visible' property instead of 'map', it works correctly.


Apr 4, 2012
Project Member #1 [email protected]
Please add a link to your demo.
Status: NeedsMoreInfo
Owner: [email protected]
Apr 5, 2012
#2 [email protected]
I had thought my report was precise enough for you to reproduce it faster than me...

Anyway, here is a link to a demo : http://nimwendil.net/_ext/gmaps/issue4052.html
Apr 10, 2012
Project Member #3 [email protected]
(No comment was entered for this change.)
Status: Confirmed
Labels: Internal-6320152
Apr 19, 2012
#4 [email protected]
This bug seems related to what I have experienced:

Draggable markers disappear after being dragged if map property is set again

Steps to reproduce:
 - create a map and add a draggable marker
 - add an event listener to the click event which updates the position of the marker and also sets the map attribute again
 - drag the marker
 - click anywhere in the map
--> the marker disappears

Demo: http://pastehtml.com/raw/bva0gduez.html

This can easily be resolved by not setting the map attribute again in the click listener.
Apr 21, 2012
#6 [email protected]
Google: this bug also breaks the very popular MarkerCluster and MarkerClustererPlus utility libraries. See  Issue 4091 
Apr 22, 2012
Project Member #7 [email protected]
 Issue 4091  has been merged into this issue.
Apr 23, 2012
#8 [email protected]
(No comment was entered for this change.)
Status: Fixed
Apr 23, 2012
#9 [email protected]
Seems to work, thanks.
Apr 24, 2012
#11 [email protected]

I can confim that it is also now working for this:
marker.setMap(null)
marker.setMap(map)
marker.setAnimation(google.maps.Animation.BOUNCE)
markerSetanimation(null)
market.setMap(null)
marker.setMap(map)

Thanks for the fix!
Sign in to add a comment

Powered by Google Project Hosting