Select to view content in your preferred language

Layers for Identify Widget

1287
10
05-26-2010 12:56 PM
BradOleson
Emerging Contributor
I'm obviously missing something pretty simple, but...

I have added a dynamic layer to the Flex Viewer.  It shows fine.  I can't get the ID widget to return anything when clicking on my layers.  I have turned off the basemap layers during testing.  The ID widget works fine on the sample ESRI "Parcels" service / layers.

Is there something that has to be customized outside of the IdentifyWidget.xml and IdentifyWidget.mxml?  If so, please enlighten me.  Thanks!

Brad
Tags (2)
0 Kudos
10 Replies
RobertScheitlin__GISP
MVP Emeritus
Brad,

   Does that layer in your mxd have the Shape and ObjectID fields visible?
0 Kudos
JacksonTrappett
Frequent Contributor
Along the same lines, is there a way to get the Shape and OBJECTID fields to not show in the identify results?  I turn off all of the other attributes I don't want in the results but those two will always show up since they have to be on.  Our end users don't want to know the OBJECTID or whether or not something is a polygon.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jackson,

    You need to add some code to the processIdentifyResults function.
old code
for (fld in obj)
{
    value = obj[fld].toString();
    content += fld + ": " + value + "\n";
}

new code
for (fld in obj)
{
    value = obj[fld].toString();
    if((fld.toUpperCase().indexOf("OBJECTID")<0)||(fld.toUpperCase().indexOf("SHAPE")<0)){
        content += fld + ": " + value + "\n";
    }
}
0 Kudos
JacksonTrappett
Frequent Contributor
That works, thanks!
0 Kudos
BradOleson
Emerging Contributor
Yes, there are several layers in the map document, and all of them have the OBJECTID and SHAPE fields turned on.  I've tried it with several layers (the full MXD / map service needed) and a pared down MXD / Map Service (one with just a few layers).  Neither of them will return records when clicked on using the ID tool.  Any thoughts?
0 Kudos
CaitlinBernier
Emerging Contributor
I wondered what your <identifylayeroption> in identify.xml was set to?  I have mine set to visible and it honors that setting when the map first comes up (the visibility of the layers in the ArcMap project.)  However, when layers are made visible after the map has been opened, it does not honor those visibility settings.  For example, the initial view of the map has the address points turned on and the water meters are off.  I can identify the address points.  When I turn on the Water Meters, I am unable to identify them even though they are now visible.  Maybe my issue sheds some light on your issue?
UPDATE!
I have since found Robert Scheitlin's identify that DOES honor layer visibility.  Thank you Robert.
0 Kudos
BradOleson
Emerging Contributor
I have mine set to "all", though I also tried "visible".  It doesn't seem to help much...or hasn't seemed to affect things, anyway.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
All,

   A new version of the identify widget is now available.

* 2.2.3 - Identify by point/line/extent/polygon are all now supported
- Info window will appear at the center of identified geometry now if returngeometryforzoom is set to true in xml file.
if returngeometryforzoom is true, when you mouse over a record the geometry for that particular record is drawn using the symbology defined in the xml
- The symbology used by the draw tools is now user defined in the xml
- Fixed an issues with link icon if prefix or suffix is supplied and a empty field.
0 Kudos
WilliamRockwell
Occasional Contributor
Hello Robert,

This may be a flex question, but does this identify tool support raster field links? I'm trying to decide whether to load some images into a raster field, or do a more traditional hyperlink. The only problem... the images are buried deep in our file folder structure, and a raster field seems more efficient. Thanks for your time.
0 Kudos