hansemannn / titanium-googlemaps

🗺 Use the Google Maps SDK in Titanium
Other
87 stars 26 forks source link

Error on Annotation Click Event #134

Closed dkjeune closed 5 years ago

dkjeune commented 5 years ago

Good morning,

I have an error sometimes on click event when I try to get userData of an Annotation : "undefined is not an object (evaluating 'e.annotation.userData')";

mapview.addEventListener('click',function(e){ alert(e.annotation.userData);
});

Can you check this point ? Thanks for help.

hansemannn commented 5 years ago

Works fine here. Make sure the userData is a dictionary that is set on creation of the annotation and make sure the clicksource is annotation.

dkjeune commented 5 years ago

Sorry, it work good ! I have under my annotation, a circle, and the event send the value of this circle. Thanks for help.