Hi,
I am trying to capture the lonlat of mouse click on map into my Angular component. I used the map.on() function to attach my listener to map. After the mouse click the function is called and the MapMouseEvent object show the correct lonlat but they cannot be copied in my component’s model. This is because the listener function is executed in a different scope, something called ZoneDelagate.invokeTask, in which all the references of my Angular component are showing undefined value. As a result, after the function is executed, the component holds old values.
I tried many things, but in vein. The root cause seems to be, the scope of listener’s execution is different from the Angular component’s scope and it is not accessible.
Hi Przemek,
I was trying to upload zip file containing four files of angular component and 4 screenshots , but it is not allowing.
Here are the Angular component two main file :
Regards,
Nilesh