Select to view content in your preferred language

On Graphics Add

678
1
03-17-2011 05:17 AM
JamesGormley
Deactivated User
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");
          });
0 Kudos
1 Reply
JamesGormley
Deactivated User
never mind. just called the method on each map.graphics.add(graphic);
0 Kudos