class dijits.identify.Identify
dojo.require("dijits.identify.Identify");
defined in dijits/identify/Identify.js
This dijit lets the users identify features on the map. The identify operation is performed when the users click on the map. A list of features will be displayed upon completion of the identify operation. When the users move the cursor over a feature, a focus link will be displayed and the corresponding feature will be highlighted on the map. Clicking the focus link will zoom the map to the corresponding feature. The users can also click a feature in the list to get information about the attribute fields and values associated with the feature.
By default, the dijit is attached to the map like an info-window. But it can also be detached and moved anywhere within the page so that the map area is uncluttered. It has an options panel that lets the users change settings such as the map services on which the identify operation is performed and the tolerance.
Class hierarchy
+------------------------------+
¦ Object ¦
+------------------------------+
Δ Δ
| |
| |
+----------------+ +--------------------+
¦ dijit._Widget ¦ ¦ dijit._Templated ¦
+----------------+ +--------------------+
Δ Δ
| |
| |
+------------------------------+
¦ dijits.identify.Identify ¦
+------------------------------+
Constructor
| new dijits.identify.Identify( params, srcNodeRef? ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Creates a new identify dijit using the given DOM node.
Parameters:
|
Methods
| Methods | Return Value | Description |
|---|---|---|
| startup() | none | Finalizes the creation of this dijit. This method should be called after the constructor for this dijit is called and before letting the users interact with it. |
| getInfoWindowConnector() | InfoWindowConnector | Returns a reference to the connector that manages this dijit like an info-window. |
| destroy() | none | Releases all resources used by the dijit. This method should be called when an instance of this dijit is no longer needed in your application. |
Usage
Create the dijit with default parameters
var identifyDijit = new dijits.identify.Identify({ map: map });
identifyDijit.startup();
When the dijit is created in this fashion, the identify operation will be performed on all map service layers added to the map. However, the users will be able to select the map services from the "options" panel in the dijit.
Create the dijit with custom parameters
var identifyDijit = new dijits.identify.Identify({
map: map,
defaultTolerance: 2,
mapServices: [
{
url: "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Portland/Portland_ESRI_LandBase_AGO/MapServer/",
name: "Portland Landbase",
displayOptions: {
"2": { layerAlias: "Tax lot", attributes: [ "TLID", "RNO" ] },
"3": { displayFieldName: "BUILD_ID" },
"4": { displayFieldName: "ZONEGEN_CL" }
}
}
],
fillSymbol: new esri.symbol.SimpleFillSymbol(
esri.symbol.SimpleFillSymbol.STYLE_SOLID,
new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_DASHDOT, new dojo.Color([ 64, 64, 64, 1 ]), 2),
new dojo.Color([ 0, 0, 255, 0.5 ])
),
locationMarker: new esri.symbol.PictureMarkerSymbol("./information_frame.png", 16, 16)
});
identifyDijit.startup();
In this case, the dijit will perform the identify operation on the map services listed in the constructor with a tolerance of 2 pixels and value of the given display fields will be used to represent each identified feature. Also, the given fillSymbol and locationMarker will be used in place of their defaults.