Select to view content in your preferred language

Identify 2.5.3 Help - Change Highlight?

1066
4
Jump to solution
03-14-2012 01:40 PM
HighKevin
Frequent Contributor
I'm using the Identify Widget to select polygons of seawall permits. They are usually stacked, so the Identify widget works great for this.

The only problem I have is once the polygons are selected, it's very difficult to see the boundary of each when you scroll over the results. Is there any way to make the way they flash or highlight more drastic when you mouse over a record? The selected parcels become slightly less transparent when the mouse is over a record, but it is not apparent enough.

I think I've exhausted my options with <simplefillsymbol> tags, but I do have Flash Builder - just don't know where to look for this in the uncompiled code.


If anyone could point me in the right direction or give me any ideas on how to achieve this, it would be greatly appreciated.

I'm using the v2.5.3 Identify widget and Flex Viewer 2.5.


Thanks!
Kevin
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Kevin,

   Sure just replace these two functions in your IdentifyWidget.mxml:

            private function mouseOverRecord(event:Event):void             {                 var gf:spark.filters.GlowFilter = new spark.filters.GlowFilter();                 gf.color = 0x00bff3;                 gf.alpha = 1;                 gf.strength = 2;                 gf.blurX = 8;                 gf.blurY = 8;                 var idResult:IdResult = ItemRenderer(event.target).data as IdResult;                 var iG:Number = (graphicsLayer.graphicProvider as ArrayCollection).getItemIndex(idResult.graphic);                 (graphicsLayer.graphicProvider as ArrayCollection).getItemAt(iG).filters = [gf];                 clearTimeout(hitimer);                 if (map.extent.containsXY(idResult.point.x, idResult.point.y))                     if(enableMoverRec)                         hitimer = setTimeout(showHighlight, 300, [idResult]);                 else                     hideInfoWindow();             }                          private function mouseOutRecord(event:Event):void             {                 var idResult:IdResult = ItemRenderer(event.target).data as IdResult;                 var iG:Number = (graphicsLayer.graphicProvider as ArrayCollection).getItemIndex(idResult.graphic);                 (graphicsLayer.graphicProvider as ArrayCollection).getItemAt(iG).filters = [];                 hideInfoWindow();                 clearSelectedGrapics(null);             }


Don't forget to click the Mark as answer check and to click the top arrow (promote) as shown below:

View solution in original post

0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus
Kevin,

   Sure just replace these two functions in your IdentifyWidget.mxml:

            private function mouseOverRecord(event:Event):void             {                 var gf:spark.filters.GlowFilter = new spark.filters.GlowFilter();                 gf.color = 0x00bff3;                 gf.alpha = 1;                 gf.strength = 2;                 gf.blurX = 8;                 gf.blurY = 8;                 var idResult:IdResult = ItemRenderer(event.target).data as IdResult;                 var iG:Number = (graphicsLayer.graphicProvider as ArrayCollection).getItemIndex(idResult.graphic);                 (graphicsLayer.graphicProvider as ArrayCollection).getItemAt(iG).filters = [gf];                 clearTimeout(hitimer);                 if (map.extent.containsXY(idResult.point.x, idResult.point.y))                     if(enableMoverRec)                         hitimer = setTimeout(showHighlight, 300, [idResult]);                 else                     hideInfoWindow();             }                          private function mouseOutRecord(event:Event):void             {                 var idResult:IdResult = ItemRenderer(event.target).data as IdResult;                 var iG:Number = (graphicsLayer.graphicProvider as ArrayCollection).getItemIndex(idResult.graphic);                 (graphicsLayer.graphicProvider as ArrayCollection).getItemAt(iG).filters = [];                 hideInfoWindow();                 clearSelectedGrapics(null);             }


Don't forget to click the Mark as answer check and to click the top arrow (promote) as shown below:
0 Kudos
HighKevin
Frequent Contributor
Once again, thanks for you help!

Now I have a different issue: I'm trying to compile the Identify Widget after making those modifications to the mxml, but I'm getting the attached error on the MXML module. ("1046: Type was not found or was not a compile-time constant: IdResultDataGroup.")

Any ideas on what I might be doing wrong?

This is actually my first time using Flash Builder and I'm lost. I followed the 'creating widgets' page on the ArcGIS Viewer for Flex Developer Guide. Trying to create a bin-release folder with the sample source code (flexviewer-2.5-src.zip).
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Kevin,

   It sounds like you do not have the identify widget in the correct directory structure.

This is what the path should look like src/widgets/Identify/IdentifyWidget.mxml

[ATTACH=CONFIG]12746[/ATTACH]
0 Kudos
HighKevin
Frequent Contributor
Robert,

Thanks again for all of your help! This is perfect.
0 Kudos