I've looked at other posts but I can't figure out what I am doing wrong. I am creating 2 graphics with my code. A point and a buffer. Basically the user will buffer an area and then be able to mark locations inside the buffer area with points (They can choose between 4 points within a drop-down box). I tried to create a graphic layer so that I can have separate clear buttons for the buffer and points. I can't get the points to clear. I tried onclick= "Graphiclayer.clear()" , but that doesn't work. Currently, I have onclick="map.getLayer('Graphic Layer ID').clear()." The second way only removes the last created point, but the user will be adding multiple points. I am not a programmer/ developer so any help would be appreciated. Ideally it would be awesome if you could remove one point at a time (similar to this example http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm) but I will settle for just having the buffer and all the points being removed separately.
Fixed that issue, but unfortunately it didn't solve the clearing issue. When I go to clear the point graphics it still only clears the last point created and not all the points.