Buffer Module
The Buffer Module implements buffering functionality in the viewer. Buffering allows the surrounding area of interest to be included in an operation, such as the Identify operation. For example, you can identify features within a kilometer radius of a point you click on the map.
If the Write to Drawing Layer setting is enabled, buffering persists on the map. This allows users to edit and export buffers as drawings.
Enable Buffering
You can enable buffering in two ways:
-
Activate the Identify multitool and select the Enable Buffering tool. The Buffer Options panel opens. The use clicks Identify , clicks, Enable Buffering , selects the buffer options , and clicks the map to identify the surrounding area .
Steps to use buffering in the viewer
-
When the Results List is the active panel, select the Show Buffer Options action from the Panel Actions Menu.
Identify features near those in the Results List (left); identify features near a particular feature
Buffer Options
From the Buffer Options panel, you can configure the scope of buffers that the user creates:
-
Distance: The number of units that the buffer extends to from the selected feature outward.
You can set the unit of measurement using the Units configuration setting below the Distance setting.
-
Units: The unit of measurement that the buffer should use to measure distance.
You can set the unit of measurement to Feet (ft), Yards (yd), Meters (m), Kilometers (km), Miles (mi), or Nautical Miles (NM).
-
Write to Drawing Layer: When the Write to Drawing Layer checkbox is selected, the buffer is added to the map as markup and persists on the map.
Configuration Properties
Module
-
bufferProjectionWkid
: The well-known ID (WKID) of projection for the Buffer module to use, or an empty string to disable projection. The default is an empty string. -
behaviors
: An array of named behaviors that run when an associated event occurs. By default, the behaviors are:-
BufferOptionsDismissedBehavior
: A behavior that runs an array of commands when the user dismisses the Buffer Options panel. By default, this includes theCloseDataFrame
command. -
BufferingErrorBehavior
: A behavior that runs an array of commands when a buffering error occurs. By default, this includes theOpenDataFrame
command.
-
-
numFeaturesWarningThreshold
: The number of features at which the viewer will confirm whether the user wants to proceed with a buffering operation. The purpose of confirmation is to warn the user the operation may take a long time. By default, this property is omitted. If omitted, the default is250
.
Views
-
BufferOptionsView
:-
targetCommands
: An array of commands to which to apply buffering. By default, the commands are:Identify
,IdentifyBufferedGeometry
,IdentifyBufferedFeature
,IdentifyBufferedFeatureSetCollection
andIdentifyBufferedFeatureSet
.
-
View Models
-
BufferOptionsViewModel
:-
addBufferToMarkupLayerByDefault
: If this property is set totrue
, any buffers added by the user are added to the map as markup by default. If this property is absent, it defaults tofalse
. bufferUnits
: An array of distance units to be available for buffering. Possible values include:feet
,yard
,meter
,kilometer
,mile
,nauticalmile
. By default, all units are included except foryard
.-
defaultBufferUnit
: The default unit of distance to use for buffering. The default iskilometer
. -
defaultBufferDistance
: The distance to buffer by default. The default is0
.
-
See Also...