Select to view content in your preferred language

Mouse Over Change Graphic Size of Highlighted Record - eSearch.

3114
6
07-06-2012 06:16 AM
ChristopherBlinn1
Deactivated User
Hello All,

I am working on changing some of actions in the mouseOverSearchResult event of Robert's eSearch widget (still using Flex Viewer 2.5 and the last version of the widget for that viewer).  What I would like to do is make the graphic of the highlighted record change in size (get bigger).  When the mouse cursor highlights another record the graphic returns to it's original size and the new record goes through the same actions.

I am thinking I need to create a function that changes the graphic size, then use an event listener in the mouseOverSearchResult event.  However, I am not sure how to just change the graphic size for the highlighted record.

Any thoughts or suggestions?

Thanks,
Chris B.
Tags (2)
0 Kudos
6 Replies
ChristopherBlinn1
Deactivated User
I believe it is fair to say that this is a difficult task.

So far I have been able to do some minor changes for the mouse over/out events.

I have removed the popup from showing when a record is highlighted in the search results, and I also have the centerAt function change the extent to center over the highlighted search result.

Rather than editing the actual graphic, I am now looking to add an additional graphic, such as an arrow over top the search result.

in the mouse over event I have this so far:

                      var pointerSymbol:Symbol = new PictureMarkerSymbol("assets/images/arrow_down_new.png",39,50,0,25,0)
    highlightedGraphic.symbol = pointerSymbol;
    map.centerAt(searchResult.point);
    highlightedGraphic.geometry = searchResult.geometry;
    highlightedGraphic.visible = true;


I then have the highlightedGraphic not visible on the mouse out event.

I thought this would draw the arrow 25 pixels above the highlighted record.  Needless to say I was wrong.  The arrow doesn't even draw.  I thinking it has something to do with setting the geometry of the highlightedGraphic, but I have already tried setting that with not much success to show for it.

I'll continue to plug along.  If anyone gets any bright ideas let me know.

Thanks in advance!

-Chris B.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Chris,

   I don't have any free time to help with code, but I would re-evaluate your workflow and really determine the need for what you are attempting. If you are just trying to draw attention to the particular search result than it would be A LOT easier to just apply a filter like a glow filter to the graphic and you could even animate the filter to flash or fade in and out a few times. Filters would be so much easier than attempting to create new geometries.
0 Kudos
ChristopherBlinn1
Deactivated User
Robert,

Thanks for the reply.

The time I have spent already trying to get the new geometries to work is starting to get out of hand.

I will definitely take your suggestion into consideration.

If I venture into using filters I will post my results.

Thanks again!

Chris B.
0 Kudos
ChristopherBlinn1
Deactivated User
Robert,

You were right, glow filters are much easier!

Thanks for your suggestion!

Best,
Chris B.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Chris,

  I would continue to look at filters as there is a bounce and many other filters that you could use to help draw the eye of the user to the graphic.
0 Kudos
DilsonKitoko
Emerging Contributor
I believe it is fair to say that this is a difficult task.

So far I have been able to do some minor changes for the mouse over/out events.

I have removed the popup from showing when a record is highlighted in the search results, and I also have the centerAt function change the extent to center over the highlighted search result.

Rather than editing the actual graphic, I am now looking to add an additional graphic, such as an arrow over top the search result.

in the mouse over event I have this so far:

                      var pointerSymbol:Symbol = new PictureMarkerSymbol("assets/images/arrow_down_new.png",39,50,0,25,0)
    highlightedGraphic.symbol = pointerSymbol;
    map.centerAt(searchResult.point);
    highlightedGraphic.geometry = searchResult.geometry;
    highlightedGraphic.visible = true;


I then have the highlightedGraphic not visible on the mouse out event.

I thought this would draw the arrow 25 pixels above the highlighted record.  Needless to say I was wrong.  The arrow doesn't even draw.  I thinking it has something to do with setting the geometry of the highlightedGraphic, but I have already tried setting that with not much success to show for it.

I'll continue to plug along.  If anyone gets any bright ideas let me know.

Thanks in advance!

-Chris B.


Hi Christopher,

I'm looking for a something similar that you did. Can you share you code, for Flex 2.5?

Thanks in advance
0 Kudos