gasparovic

[RESOLVED]How to override the onClick event on graphic which has attributes to..

Discussion created by gasparovic on Jun 7, 2012
Latest reply on Jun 7, 2012 by gasparovic
Hi I've noticed that once the graphic has some attributes, which is common for graphics from queries or with custom attributes, then it's impossible to draw another graphic over the existing one, as when you click on the graphic, it shows the info window instead of proceeding with the map 'onclick' event.

Here is the example :
- I have a measure tools that measure the area and after the polygonal graphic is drawn I set it some attributes
- I want to be able to draw another polygonal graphic, let's say within the one created in the step above. But because the graphic has atributes (and template), instead if drawing another vertex it's showing the infoWindow.

If the graphic has no attributes (and no infoTemplate) the drawing works normally.

Any ideas on how to prevent the InfoWindow to show up and proceed with the map "onClick" event? Or eventually, how to pass the event of the click on the graphic layer onto the map elemtns itself??

Thank you

here is the sample in js fiddle:  JS FIDDLE SAMPLE
1) create a polygon
2) try to create second polygon from within the first one

Outcomes