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");
});