Unable to access default parameters when event is dispatched using on.emit()

404
0
05-14-2013 04:50 AM
ShashankA
New Contributor
Hi All,

I'm adding a Raphael area on top of ESRI map surface area to render some graphics I needed.
When I instantiate the Raphael instance with equal width and height as that of map, Events are not triggered on the map surface.

I mean when I click on the empty area on the Raphael surface I want the click event to be invoked on the map.
For doing that I added a click event on the Raphael Instance Canvas and from the event listener dispatching the click event on the  map(Events on the map registered using 'dojo.on()' so that they can be dispatched using 'on.emit()' method).

But by doing so I could invoke the handler registered for the click event on the map but, When I try to access the properties of the  click event for example say 'event.mapPoint' error is being thrown(Access of undefined property) which is a valid error.

Because the event handler gets values that are passed from the on.emit()'s third parameter.

Is there a way to invoke the listener with the default or original values that are passed when the listener is invoked when an user  clicks directly on the map area.


Can some body tell me how to do that? I'm using 3.4 version of ArcGIS Js API.

Thanks in advance.
0 Kudos
0 Replies