Select to view content in your preferred language

add ROLL_OVER on QueryWidget

1758
20
Jump to solution
08-21-2014 03:46 AM
NatashaManzuiga
Occasional Contributor

Hi, I 'm trying to add a ROLL_OVER function on mouseovergraphic

I added this line on createQueryResults..

graphic.addEventListener(MouseEvent.ROLL_OVER, mouseOverGraphic);

and the function:

private function mouseOverGraphic(event:MouseEvent):void
    {
        var gra:Graphic = event.currentTarget as Graphic;
        var infoData:Object = gra.attributes;
           
        clearTimeout(hitimer);
        var queryResult:ResultItem = gra.attributes as ResultItem;
        if (map.extent.containsXY(queryResult.center.x, queryResult.center.y))
                // only show infowindow if query result in contained within map extent
        {
            hitimer = setTimeout(showHighlight, 300, [ queryResult ]);
        }
        else
        {
            hideInfoWindow();
        }

    }

What I'm wronging?

Naty

0 Kudos
20 Replies
NatashaManzuiga
Occasional Contributor

ahhaah I didn't want to confuse you..

Yes, I have search's graphical selection tool active...I want this...because search graphical should be always active...event after I run the querywidget...cause the end user doesnt know that he has to close the querywidget

Thanks Robert!

0 Kudos