<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Change HandCursor while MouseOver GraphicsLayer in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/change-handcursor-while-mouseover-graphicslayer/m-p/668324#M15040</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi.&amp;nbsp; I have some point data from a REST service that I am displaying on my map using pretty icons defined in a GraphicsLayer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;esri:Map . . .&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; . . .
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:GraphicsLayer&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:symbol&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:PictureMarkerSymbol source="...icon.png" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:symbol&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:GraphicsLayer&amp;gt;
&amp;lt;/esri:Map&amp;gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a map click handler to do something when the user clicks a point.&amp;nbsp; Currently, the "grab" cursor is present anywhere on the map so the user knows to pan.&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG&gt;How do I change the cursor to a finger pointer while hovering over a point?&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried adding to the GraphicsLayer useHandCursor="true" but this had no effect, even if I set it to false.&amp;nbsp; I tried setting useHandCursor="true" (and false) to the map itself and still no effect.&amp;nbsp; Is ESRI overriding the cursor?&amp;nbsp; How do I take control of it?&amp;nbsp; Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Feb 2011 19:05:03 GMT</pubDate>
    <dc:creator>EricSegerson</dc:creator>
    <dc:date>2011-02-17T19:05:03Z</dc:date>
    <item>
      <title>Change HandCursor while MouseOver GraphicsLayer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/change-handcursor-while-mouseover-graphicslayer/m-p/668324#M15040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi.&amp;nbsp; I have some point data from a REST service that I am displaying on my map using pretty icons defined in a GraphicsLayer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;esri:Map . . .&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; . . .
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:GraphicsLayer&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:symbol&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:PictureMarkerSymbol source="...icon.png" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:symbol&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:GraphicsLayer&amp;gt;
&amp;lt;/esri:Map&amp;gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a map click handler to do something when the user clicks a point.&amp;nbsp; Currently, the "grab" cursor is present anywhere on the map so the user knows to pan.&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG&gt;How do I change the cursor to a finger pointer while hovering over a point?&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried adding to the GraphicsLayer useHandCursor="true" but this had no effect, even if I set it to false.&amp;nbsp; I tried setting useHandCursor="true" (and false) to the map itself and still no effect.&amp;nbsp; Is ESRI overriding the cursor?&amp;nbsp; How do I take control of it?&amp;nbsp; Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Feb 2011 19:05:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/change-handcursor-while-mouseover-graphicslayer/m-p/668324#M15040</guid>
      <dc:creator>EricSegerson</dc:creator>
      <dc:date>2011-02-17T19:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Change HandCursor while MouseOver GraphicsLayer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/change-handcursor-while-mouseover-graphicslayer/m-p/668325#M15041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Eric,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; You need to use the maps cursor manager and set your own cursor and ensure to remove it your self also:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; Code provided by Tom Hill&amp;nbsp; (esri)

 [Embed(source="assets/images/spotlight.png")]
 private var _spotlightIcon:Class;

 // Mouse cursor management
 private var _cursorID:int = -1;
 private var _currentCursor:Class;

 //--------------------------------------------------------------------------
 //
 //&amp;nbsp; Cursor management methods
 //
 //--------------------------------------------------------------------------
 
 private function setCursor( cursor:Class ):void
 {
&amp;nbsp; if (cursor) {
&amp;nbsp;&amp;nbsp; if (cursor !== _currentCursor) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; clearCursor();
&amp;nbsp;&amp;nbsp;&amp;nbsp; _currentCursor = cursor;
&amp;nbsp;&amp;nbsp;&amp;nbsp; _cursorID = map.cursorManager.setCursor(cursor);
&amp;nbsp;&amp;nbsp; }
&amp;nbsp; } else {
&amp;nbsp;&amp;nbsp; clearCursor();
&amp;nbsp; }
 }
 
 private function clearCursor():void
 {
&amp;nbsp; if (_currentCursor) {
&amp;nbsp;&amp;nbsp; map.cursorManager.removeCursor(_cursorID);
&amp;nbsp;&amp;nbsp; _cursorID = -1;
&amp;nbsp;&amp;nbsp; _currentCursor = null;
&amp;nbsp; }
 }&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:14:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/change-handcursor-while-mouseover-graphicslayer/m-p/668325#M15041</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T04:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: Change HandCursor while MouseOver GraphicsLayer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/change-handcursor-while-mouseover-graphicslayer/m-p/668326#M15042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks.&amp;nbsp; Your code is useful.&amp;nbsp; I added mouseOver="setCursor(_spotlightIcon)" and mouseOut="clearCursor()" to my GraphicsLayer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But in order to make this effective, I would need to create a custom finger pointer cursor (apparently called a "hand cursor", which is different from the map pan cursor).&amp;nbsp; Is there any way to use the built-in cursor?&amp;nbsp; See &lt;/SPAN&gt;&lt;A href="http://www.switchonthecode.com/tutorials/showing-the-hand-cursor-in-flex"&gt;http://www.switchonthecode.com/tutorials/showing-the-hand-cursor-in-flex&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; This has no effect on the map, though.&amp;nbsp; Any ideas?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe the "hand cursor" is part of the OS and not part of Flash?&amp;nbsp; (If so, I might have more flexibility in Flash 10.2.) &lt;/SPAN&gt;&lt;A href="http://www.adobe.com/devnet/flashplayer/articles/native-mouse-cursors.html"&gt;http://www.adobe.com/devnet/flashplayer/articles/native-mouse-cursors.html&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; 10.2 isn't really a desirable solution for me right now, though.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 18:20:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/change-handcursor-while-mouseover-graphicslayer/m-p/668326#M15042</guid>
      <dc:creator>EricSegerson</dc:creator>
      <dc:date>2011-02-18T18:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Change HandCursor while MouseOver GraphicsLayer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/change-handcursor-while-mouseover-graphicslayer/m-p/668327#M15043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Eric,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Easily fixed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;// for mouse over use
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myMap.openHandCursorVisible = false;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Mouse.cursor = MouseCursor.BUTTON;
//Mouse out use:
&amp;nbsp;&amp;nbsp;&amp;nbsp; Mouse.cursor = MouseCursor.AUTO;
&amp;nbsp;&amp;nbsp;&amp;nbsp; myMap.openHandCursorVisible = true;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:14:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/change-handcursor-while-mouseover-graphicslayer/m-p/668327#M15043</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T04:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: Change HandCursor while MouseOver GraphicsLayer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/change-handcursor-while-mouseover-graphicslayer/m-p/668328#M15044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;One way I do it is with the code below.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
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;
});
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Drew&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:14:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/change-handcursor-while-mouseover-graphicslayer/m-p/668328#M15044</guid>
      <dc:creator>Drew</dc:creator>
      <dc:date>2021-12-12T04:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: Change HandCursor while MouseOver GraphicsLayer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/change-handcursor-while-mouseover-graphicslayer/m-p/668329#M15045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert, your code worked great!&amp;nbsp; Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Feb 2011 19:39:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/change-handcursor-while-mouseover-graphicslayer/m-p/668329#M15045</guid>
      <dc:creator>EricSegerson</dc:creator>
      <dc:date>2011-02-22T19:39:02Z</dc:date>
    </item>
  </channel>
</rss>

