Select to view content in your preferred language

Identify Widget Identify "LayerOption" Problem

1094
7
09-23-2010 06:31 PM
HenryKo
Deactivated User
Hi,

I am having lots of trouble with the Flex API 1.3 Identify Widget from the Sample Flex Viewer.

If I use the "all" layerOption parameter then it works fine.

But if I use the "visible" layerOption parameter then there are no results.

I have intercepted the http requests with Fiddler for both cases and they are essentially the same (of course minus the layerOption parameter).

In my debugger the layerIds are as expected.

I have tried Erwan Caradec's code (http://forums.esri.com/Thread.asp?c=158&f=2421&t=299664) and Robert Scheitlin's enhanced Identify Widget code as well and both did not work.

Help!
Tags (2)
0 Kudos
7 Replies
RobertScheitlin__GISP
MVP Emeritus
Henry,

   Do you know what version of my identify widget you tried? the latest one was 1.3
0 Kudos
HenryKo
Deactivated User
Hi Robert,

I think the one I used is version 1.2 from here:
http://forums.esri.com/Thread.asp?c=158&f=2421&t=284848

Can you provide a link to 1.3? I did a quick Google but couldn't find it.

Thank you.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Henry,

   I can seem to find that thread anymore either... Oh well here is my version 1.3
0 Kudos
HenryKo
Deactivated User
Hi Robert, thank you.

Unfortunately that didn't work - as soon as I change identifyParams.layerOption from "all" to "visible", it just returns nothing (i.e. result returned successfully just there is zero result).

One thing though - the layers in the map services are turned off by default and are turned back to visible in the Flex viewer (so you can see them on map and they are checked/ticked in the TOC/LiveMapWidget). Not sure if this makes any difference.

Thanks.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Henry,

   I have to say that you are the first to say that the visible option in my 1.3 version does not work. I have many people using it that have said just the opposite. Don't know what to tell you... Knowing the code and what it is doing it is not logical that you are having any issue.
0 Kudos
HenryKo
Deactivated User
Hi Robert,

I probably have got to cause of the problem: the MXD had all 5 layers turned off by default. So I made a copy of the MXD, turned on all 5 layers, published it as a map service and started consuming this new map service. Then both "visible" and "all" options work as expected!

I still don't understand why, but at least now it works. If you are interested in this matter further, I am happy to provide detailed information.

p.s. would you know the answer to my other question: http://forums.arcgis.com/threads/13592-Identify-Widget-with-Graphics-Layer?p=41407#post41407?

Thanks again.
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