gorm1267

On Graphics Add

Discussion created by gorm1267 on Mar 17, 2011
Latest reply on Mar 18, 2011 by gorm1267
I am trying to add a listener to the Add and Clear event of map.graphics on init.  I am using the Javascript API.  What i want to do ultimately is when graphics are added to a map i want a button to be active or inactive.  does anyone know what i am doing wrong?

dojo.connect(map.graphics, "onGraphicsClear", function removeGraphic(geometry) {
              getbutton("true");
          });
          dojo.connect(map.graphics, "onGraphicsAdd", function removeGraphic(geometry) {
              getbutton("false");
          });

Outcomes