Select to view content in your preferred language

Identify/Info of Multiple Items of the Same Layer (in Flex)

2405
18
04-07-2011 11:55 AM
AlexZhuk
Frequent Contributor
Is there a way to get information of several items/features of the same layer when they (items) overlap? It's a standard part of the Desktop or .Net Server. is this possible in Flex?
Tags (2)
0 Kudos
18 Replies
RobertScheitlin__GISP
MVP Emeritus
Alex,

   Every time you are making changes to the layers name in ArcMap are you then restarting the map service and Clearing the REST Service Cache?
0 Kudos
AlexZhuk
Frequent Contributor
Robert,

Yes, I do clear browser cache and REST cache, and restart the service, and even restart the IIS. Nothing works.  I guess, my application will be without any Identify tool. I spent so much time fighting with every little detail on this Flex exercise. It's alright... I'm about to give up...

Thanks for all your help,

Alex
San Francisco, CA
0 Kudos
AlexZhuk
Frequent Contributor
One last attempt.
My layers have tokens in the config.xml file. Do I need to somehow specify tokens in the IdentifyWidget.xml file too? When I use the Identify tool and make a selection on my map, the tool then switches to the results window, which remains blank.

Thanks.
0 Kudos
SteveWhitehead__GISP
Regular Contributor
Alex,
I have the same issue, did you have any luck?  Worked perfectly before I secured my service.  I have all my layers as operational in one dynamic service (not individually listed).
Cheers
Steve
0 Kudos
AlexZhuk
Frequent Contributor
Steve,
I couldn't make it work until I UNsecured the service...
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Guys,

   As you could probably tell by my lack of answers I do not use secure services so I can't help with those questions. As you both probably also know you just can't enable security on ArcGIS Server and then easily turn it off so I won't be messing with my development server or production server to enable security. Maybe others that use security will chime in eventually.
0 Kudos
RhettZufelt
MVP Notable Contributor
Alex,

  Oh I guess that it would have helped if you said that you where trying to do this using the SimpleInfoWinWidget. It uses whichever geometry is on top as it gets triggered by mouse events. Why not use the identify widget?


Hi Robert,

Thought for sure I saw a post somewhere where you describe how to turn off the "move to top on hover" event that moves the geometry to the top when you hover over it.  I have overlapping polygons in my service, and is sorted by area (smaller polys on top).  When it loads into flexviewer (using 2.5 now), the graphics come across as they are sorted in the service.  However, when I hover over it, the first one I hover on moves to the top and I can no longer get the feature underneath to move to top.

So, figure if I can turn off this feature, then the smaller polys will stay on top so I can InfoTemplate them.  Like I said, thought I saw a post on this, but this is the only related post I seem to be able to find today.  Any chance you could point me to the other post, or to the right section of code to handle this?

Thanks yet again,

Rhett

Would use the identify widget, but am taking advantage of your wonderfull multiimagefield on these layers.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rhett,

 
Would use the identify widget, but am taking advantage of your  wonderful multiimagefield on these layers
Unfortunately that is  a problem. The Attachment Relate Info Window Widget is working with the graphics that are already in the map. To disable the graphics autoMoveToTop property you have to have access to the graphic when it is added to the map. Here is an untested workaround:


in the MapManager find the addLayerToMap function and then the case "feature": and add these lines:

                        if (label == "your layers label")
                            featureLayer.addEventListener(GraphicEvent.GRAPHIC_ADD, disableAutoTop);
// this should be added right before map.addLayer(featureLayer);


Then add this new function (but not inside the addLayerToMap's code block):

            private function disableAutoTop(event:GraphicEvent):void
            {
                event.graphic.autoMoveToTop = false;
            }


See if that works.
0 Kudos
RhettZufelt
MVP Notable Contributor
Thanks Robert,

Once I added the import statement it seems to be working.

import com.esri.ags.events.GraphicEvent


Still have some testing to do, but it appears to give me what I need.

Thanks again,

Rhett
0 Kudos