Professional Documents
Culture Documents
Buffering Features
Before a feature can be buffered you need to set various properties through the
BufferParameters object. Properties include distances and units of measure. The distance
property allows you to set multiple distances for your buffer operations using an array of
numeric values. This is handy for creating multi-buffer polygons of various distances. The units
property also needs to be set and can be set to feet, meters, kilometers, and miles. Other
important parameters include features property which specifies the input feature to be
buffered. UnionResults is a true/false value that indicates whether you should union all buffers
into a single output polygon. Finally, the outSpatialReference property is used to specify an
output spatial reference for the returned graphics.
The buffer( ) method on GeometryService is used to perform the buffer using input parameters
specified in a BufferParameters object. As you can see from the code example on this slide,
when a new instance of a GeometryService is created you need to point to a URL containing a
valid map service. A callback function is executed upon return from the buffer( ) method and
an array of graphic polygons is passed into the callback function for processing.