Open topic with navigation
The Identify Module implements identify operations. It provides a set of configurable tools, each of which runs an
Identify command on a particular type of geometry. The tools return a collection of features that intersect the geometry that the user draws on the map. The feature set collection is then used by some other module, which renders the feature set collection in its view.
For example, the MapTips Module uses the
Identify command to identify a feature located at a particular point. The MapTips view then renders the feature returned by the
WMS layers that are not associated with a WFS only support point identify operations, whereas WMS layers associated with a WFS support all types of identify operations.
As of HTML5 Viewer 2.5, the user can choose which layers are affected by the Identify tools by clicking the Identifiable Layers button. Users can also enable buffering to identify nearby features.
The Identifiable Layers button is configured in context-sensitive toolbars within the TabbedToolbar and CompactToolbar modules. The easiest way to configure this feature is to edit your viewer in Geocortex Essentials Manager, and open the viewer's Toolbar page.
To enable this feature for the standalone Identify tool in the tabbed toolbar, ensure both Identify and IdentifyToolControlRegion are included in your configured toolbar.
To enable this feature for the Identify multitool in the tabbed toolbar, ensure both Find Data and FindDataControlRegion are included in your configured toolbar.
In the case of the compact toolbar, do not include the regions.
The Identify multitool also provides options to add to existing identify results or to subtract from existing identify results. (These options are not currently available for handheld devices.) To add to existing results, click Identify to open the menu, click Enable Add Results, then click another item on the map to add it to the results list. Similarly, to subtract from existing results, click Identify to open the menu, click Enable Subtract Results, then click an item previously identified to remove it from the results list.
By default, Identify is turned off after each use. To continue to add to or subtract from the identify results, click Identify and click or tap another location on the map. When the user closes the Results List or Table, the features that were listed are discarded.
The Identify multitool showing the Enable Add Results and Enable Subtract Results options
Note that if Enable Add Results is active and the user clicks Enable Subtract Results, the add results option is disabled. Similarly, if Enable Subtract Results is active and the user clicks Enable Add Results, the subtract results option is disabled.
resultsDisplayName: The title of the Results List that displays after an identify operation. The default is
true, the feature set collection that is returned by the identify operation includes features from the topmost layer only. The default is
visibleLayersOnly: To restrict the identify operation to perform only on visible layers, set to
true. The default is
layersInVisibleScaleRangeOnly: To restrict the identify operation to perform only on layers within the visible scale range, set to
true. The default is
pixelTolerance: A positive integer that defines the maximum number of pixels away from a feature the user can click with a point-based Identify tool in order to identify the feature. The default pixel tolerance is 5 pixels.
polygonPixelTolerance: A positive integer that defines the maximum number of pixels away from a feature the user can draw a shape with a polygon-based Identify tool in order to identify the feature. The default polygon pixel tolerance is 0 pixels, in other words, the user must draw a shape that directly overlaps at least part of the feature.
returnGeometry: When this property is
true, the identify operation returns a geometry. This is useful for feature actions that require the geometry, like
PanToFeature. The default is
restrictRasterIdentifyToPoint: When this property is
true, only point-identify operations return results from image services and raster layers. If the user performs some other type of identify, such as a rectangle identify, no results are returned from image services and raster layers. By default,
If you want all identify operations to return results from image services and raster layers, set this property to
false. This is useful when the user wants to get a sense of what's in an area—the user can perform a single identify operation that returns results from multiple feature layers, images services, and raster layers. Note that line-based and polygon-based identify operations return the results for a single point in raster layers and image services. Line-based identify operations return the values for the line's midpoint. Polygon-based identify operations return the values for the polygon's centroid.
identifyProviders: An array of identify providers. The default providers are:
GraphicsLayerIdentifyProvider: This provider enables identify operations on graphics layers, such as the markup layer, collaboration layers, and ArcGIS Stream Layers.
MapIdentifyTaskIdentifyProvider: This provider enables identify operations on feature layers.
RasterIdentifyTaskIdentifyProvider: This provider enables identify operations on image services and raster layers.
tools: An array of tools that perform identify operations. The factory configuration has tools to identify by point, by rectangle, by polyline, by polygon, and by freehand polygon.
The Tools Module implements the ability to define an array of tools in other modules. Each tool in the array has the following properties:
name: The name of the tool.
If your viewer is going to be available in more than one language, enter the text key that the tool name is assigned to.
command: The command that the tool runs.
For a list of commands, see Viewer Commands and Events.
drawMode: The type of geometry the user draws, upon which the tool operates.
isSticky: When set to
true, the tool remains selected after the user has used it. To deselect the tool, the user must click the tool a second time, or click a different tool. This allows the user to use a tool repeatedly without having to reselect it each time.
If you do not want a tool to remain selected after it is used, set
iconUri: The image that displays beside the tool.
statusText: The status message to display when the tool's input method is via mouse, often containing instructions for the user. You can use a text key or the literal text.
keyboardStatusText: The status message to display when the tool's input method is via keyboard, often containing keyboard shortcut hints for the user. You can use a text key or the literal text.
behaviors: An array of named behaviors that run when an associated event occurs. By default, the behaviors are:
SelectLayersForIdentifyActivatedBehavior: A behavior that runs an array of commands when the user clicks the Identifiable Layers button. By default, this includes the
SelectLayersForIdentifyDeactivatedBehavior: A behavior that runs an array of commands when the Identifiable Layers panel is dismissed by a toggle button. By default, this includes the
You can remove or rearrange the commands of any behavior. You can also remove behaviors altogether.
You can add commands to a behavior if the command does not require a parameter, or if the type of the command's parameter matches the parameter of an existing command or the event associated with the behavior. Refer to "Viewer Commands and Events" in Developer Help to determine if the parameters are compatible. Note that private commands and events are not documented.
Adding a new behavior is only recommended for experienced developers.
See Viewer Commands and Events for more information.