AnsweredAssumed Answered

"Buffer Point" function/sample inserted in Web App ?

Question asked by SiteMarker on Jan 13, 2012
Latest reply on Jan 13, 2012 by SiteMarker
I am trying to use the "Buffer Point" function. I am trying to use it in much the same way the sample works in the Javascript API samples area on the resource center ( I am hoping to be able to have the user click on a newly created 'Buffer' button, then click on the map in any location, and the ring graphic will appear, having buffered the point by my specified distances (set in the array).

I have downloaded the 'basic viewer' web app from ArcGIS Online (javascript) and am tweaking it with my limited knowledge of programming. I have used the "print" button section of the code to convert to this function, changed the png/title/label etc for it and made it a "toggleButton" so that it can be toggled much the same way the 'Measure' tool is toggled. I have also changed the array to the three distances I want to buffer by. The button now looks right, and can be clicked on and off. From here I am lost. I need to somehow link the button to the buffering function and function to show the buffer graphics (from the sample). In the sample, it seems to call up a new map when it is initialized, but I need for the arcgis map that my app is based on to stay in the map frame, and be able to be panned/zoomed/etc before and after the buffer is created by the user. I am also hoping to have the 'toggleButton' essentially switch on and off the buffering "ability" of the application.

To make this more simple, if anyone can show me how to essentially add the 'buffer point' sample from the sample area in the Resource Center API help (link above) to a standard web app downloaded from ArcGIS Online (in javascript), then I can probably figure out how to insert it in my app specifically.

Thank you so much to anyone who can help!! Been struggling with this for many hours.