<esri:Map . . .> . . . <esri:GraphicsLayer> <esri:symbol> <esri:PictureMarkerSymbol source="...icon.png" /> </esri:symbol> </esri:GraphicsLayer> </esri:Map>
graphic.addEventListener(MouseEvent.ROLL_OVER, function(event:MouseEvent):void { map.panEnabled = false; graphic.buttonMode = true; graphic.useHandCursor = true; }); graphic.addEventListener(MouseEvent.ROLL_OUT, function(event:MouseEvent):void { graphic.buttonMode = false; graphic.useHandCursor = false; map.panEnabled = true; });
// for mouse over use myMap.openHandCursorVisible = false; Mouse.cursor = MouseCursor.BUTTON; //Mouse out use: Mouse.cursor = MouseCursor.AUTO; myMap.openHandCursorVisible = true;
Code provided by Tom Hill (esri) [Embed(source="assets/images/spotlight.png")] private var _spotlightIcon:Class; // Mouse cursor management private var _cursorID:int = -1; private var _currentCursor:Class; //-------------------------------------------------------------------------- // // Cursor management methods // //-------------------------------------------------------------------------- private function setCursor( cursor:Class ):void { if (cursor) { if (cursor !== _currentCursor) { clearCursor(); _currentCursor = cursor; _cursorID = map.cursorManager.setCursor(cursor); } } else { clearCursor(); } } private function clearCursor():void { if (_currentCursor) { map.cursorManager.removeCursor(_cursorID); _cursorID = -1; _currentCursor = null; } }
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.