<layer> <name>Soils</name> <id>0</id> <url>http://gislap183/arcgis/rest/services/RasterIdentify/MapServer</url> <fields> <field name="MUSYM" /> </fields> <links> <link includeinresults="false" field="" alias="" tooltip=""> <linkprefix /> <linksuffix /> <iconfield /> <iconprefix /> <iconsuffix /> </link> </links> <zoomscale>15000</zoomscale> <forcescale>true</forcescale> </layer>
<field name="Pixel Value" alias="NAVD88 (m)" numberformat="2|,|." />
All, Configuring the identification of raster layers is now supported in the 3.1.2 version of the Identify Widget.
Perfect Robert! your help is truly appreciated. Well on my way.
<mx:Image id="iDrawLine" name="{DrawTool.POLYLINE}" width="40" height="40" buttonMode="true" click="{activateIdentifyTool(event)}" rollOut="iconRollOutHandler(event)" rollOver="iconRollOverHandler(event)" source="assets/images/i_draw_line.png" toolTip="{lineLabel}" useHandCursor="true" visible="false"/> <mx:Image id="iDrawExt" name="{DrawTool.EXTENT}" width="40" height="40" buttonMode="true" click="{activateIdentifyTool(event)}" rollOut="iconRollOutHandler(event)" rollOver="iconRollOverHandler(event)" source="assets/images/i_draw_rect.png" toolTip="{rectLabel}" useHandCursor="true" visible="false"/> <mx:Image id="iDrawPoly" name="{DrawTool.POLYGON}" width="40" height="40" buttonMode="true" click="{activateIdentifyTool(event)}" rollOut="iconRollOutHandler(event)" rollOver="iconRollOverHandler(event)" source="assets/images/i_draw_poly.png" toolTip="{polyLabel}" useHandCursor="true" visible="false"/>
private function onResult(event:IdentifyEvent):void { //My stuff var identifyResults:Array = event.identifyResults; var cFormater:NumberFormatter = new NumberFormatter cFormater.precision = "2"; cFormater.rounding = "nearest"; cFormater.decimalSeparatorFrom = "." cFormater.decimalSeparatorTo = "." cFormater.useThousandsSeparator = "false"; //End my stuff if(!identifyArrayCollection) identifyArrayCollection = new ArrayCollection(); for each (var identifyResult:IdentifyResult in identifyResults) { var title:String = identifyResult.layerName; var obj:Object = identifyResult.feature.attributes; //var content:String = 'X & Y: ' + cFormater.format((identifyResult.feature.geometry as MapPoint).x) + ", " + cFormater.format((identifyResult.feature.geometry as MapPoint).y) + "\n"; var content:String = ""; var fld:String; var value:String; var link:String = ""; var linkicon:String = ""; var identFields:String = ""; var identLinkPre:String = ""; var identLinkField:String = ""; var identLinkSuffix:String = ""; var identLinkIcon:String = ""; var identLinkIconPre:String = ""; var identLinkIconSuffix:String = ""; var identZoom:Number = 0; var identForceScale:Boolean = false; var idResult:IdResult = new IdResult(); for(var i:int=0; i<configIdentFields.length; i++) { if (identifyResult.layerName == configIdentFields.label) { identLinkField = configIdentFields.linkfield; identFields = configIdentFields.fields; identLinkPre = configIdentFields.linkpre; identLinkSuffix = configIdentFields.linksuffix; identLinkIconPre = configIdentFields.linkiconpre; identLinkIcon = configIdentFields.linkicon; identLinkIconSuffix = configIdentFields.linkiconsuffix; identZoom = configIdentFields.zoomscale; identForceScale = configIdentFields.forcescale; } } if(identFields != "") { var fldArr:Array = StringUtil.trimArrayElements(identFields,",").split(","); for (var f:Number = 0; f < fldArr.length; f++) { try{ value = obj[fldArr] ? String(obj[fldArr]) : ""; } catch (error: Error){ value = ""; } value += " Feet"; ...........................................................................................................
Martyn,1) Currently No, not without changing the code.2) Currently No, not without changing the code.3) Aliases are pulled from the featureclass or map document automatically when using the Identify task.If you have the ability to change the code and recompile then just let me know and I will point you to where changes need to be made.
Martyn, No that is definitely a bad assumption. The identify widget is capable of because it sends the request to the server and works server side with the identify request. A popup is usually working client side with the featurelayers graphics or a query and or select request (which does go back to the server, but is not going to return a pixel value).
Thanks Martyn,I got the identity tool to give me the values. However, I noticed that you have it saying "Depth", wheras I just get "Pixel value". Was wondering how you got the "Depth" to show instead.Thanks,R_
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.