Error on Annotation Click Event
dkjeune opened this issue · comments
dkjeune commented
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.
Hans Knöchel commented
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
Sorry, it work good !
I have under my annotation, a circle, and the event send the value of this circle.
Thanks for help.