Select to view content in your preferred language

InfoSymbol using DataGrid and/or Grid - 1.3 not SFV

1504
2
08-17-2010 09:54 AM
CarmenDurham
Frequent Contributor
Hello,

We have an app that allows the police to click on the screen  using map.MapClick to display an InfoSymbol window with Parcel and hopefully Police Beat information through an Identify Task.  I need only limited fields from each layer.  The app uses a button to activate the mapclick listener. 

Tried two things with outcomes that each had their faults:


  • Tried using a DataGrid in the infosymbol in mxml (see below img) - This will display just the fields I want for the two layers BUT the order in which they are displayed are always random.  I would like it to always in a specific field order and be able to concatenate City,State into one record. Plus the field names are cryptic.  (pretend Zoning is Police Beat in below image)




  • Tried using just a Flex GRID in the infosymbol (see below img) : This allowed me to concatenate two fields, designate an exact order of display, and easy to change the Field Name displayed.  BUT it will only display the information for the last layer identified (parcels in this case).  I can see where it is going wrong -- but I cannot figure out how to assign multiple feature attributes to the graphic.  Tried working with graphicsLayer vs. a graphic without much luck.



At this point, if anyone can guide me how to fix either case to have, I'll be happy.  At a minimum, I need to fix the field display order by field name and limit the fields displayed from each layer included in the Identify Task.

Attached is the code for the functions called by the button and the .mxml portion for the infosymbol.  I hope it is something simple that I am missing.

Thanks,
Carmen Durham
City of Greenville, SC
0 Kudos
2 Replies
by Anonymous User
Not applicable
Original User: elcee

Carmen,

Not exactly an answer...

I am having nearly the same problem. See this post:

http://forums.arcgis.com/threads/9025-Returning-attributes-from-overlapping-polygons

I can get my results window to show the results in the same order every time, but I cannot populate the window with the result from both feature classes.

I started working with some of the suggested solutions, but so far I haven't had any success. Mybe they will work for you. Let me know if they do.

elcee
0 Kudos
CarmenDurham
Frequent Contributor
Lisa,



I finally got something to work with the Flex Grid within the InfoSymbol (not using DataGrid)!  I had an AHA! moment about 30 minutes ago and it turned out to be simple (used stuff from SFV).  I am sure it isn't the most elegant way to program it, especially if you wanted to display a lot of fields.  It was all in the IdentifyResultFunction.  See attached file for code...

It should work for you also since you were using {data.fieldnamehere} within a Label. 

The script talks about Police Beats, but uses the ZONING field - that is because I just hadn't set up a service with Police Beats yet.  Just trying to get something to work with a service and two layers.  So for me Layer 0 is Parcels and 2 is Zoning.

Carmen
0 Kudos