views:

17

answers:

1

I want to fire dragend event of a marker in another event say click event on the map. how can I do that?

google.maps.event.addListener(map,'click',function(pt){
   posSelectMarker.setPosition(pt.latLng);
   //Here I want to fire dragend event.
});
+1  A: 

Use event.trigger;

google.maps.event.trigger(markerObject, 'dragend', args);
TheDeadMedic