import mx.controls.ToolTip; import mx.managers.ToolTipManager; private var customToolTip:ToolTip; protected function map_loadHandler(event:MapEvent):void { //map.addEventListener(FlareMouseEvent.FLARE_CLICK, flareClickHandler); map.addEventListener(FlareEvent.FLARE_IN_START, flareInStartHandler); addEventListener(FlareMouseEvent.FLARE_OUT, rollOutHandler); map.addEventListener(FlareMouseEvent.FLARE_OVER, rollOverHandler); } private function showCustomToolTip(gr:Graphic, stagex:Number, stagey:Number):void { customToolTip = ToolTipManager.createToolTip(gr.attributes.CITY_NAME,stagex,stagey) as ToolTip; } protected function rollOverHandler(event:FlareMouseEvent):void { removeEventListener(FlareMouseEvent.FLARE_OVER, rollOverHandler); showCustomToolTip(event.graphic, event.stageX, event.stageY); } protected function rollOutHandler(event:FlareMouseEvent):void { ToolTipManager.destroyToolTip(customToolTip); }
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.