<?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 Re: Stop flashing of graphic on mouse pointer hovering in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/stop-flashing-of-graphic-on-mouse-pointer-hovering/m-p/1080045#M73920</link>
    <description>&lt;P&gt;Thank you Robert&lt;/P&gt;</description>
    <pubDate>Sun, 18 Jul 2021 02:19:05 GMT</pubDate>
    <dc:creator>victhomas</dc:creator>
    <dc:date>2021-07-18T02:19:05Z</dc:date>
    <item>
      <title>Stop flashing of graphic on mouse pointer hovering</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/stop-flashing-of-graphic-on-mouse-pointer-hovering/m-p/1077976#M73828</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;Looking for ways to stop the flashing of color while inside of a feature when hover over it.&amp;nbsp; Mouse pointer over the feature, it changes color, but then if I move the&amp;nbsp; mouse pointer/cursor while still inside of the feature it flashes.&amp;nbsp; It looks like its restarting the change of the graphic color over and over again.&amp;nbsp; Is there to just persist the color when hovering over the feature without it flashing?&amp;nbsp; Thanks.&lt;/P&gt;&lt;P&gt;Below is the sample code.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta charset="utf-8" /&amp;gt;
    &amp;lt;meta
      name="viewport"
      content="initial-scale=1,maximum-scale=1,user-scalable=no"
    /&amp;gt;


    &amp;lt;style&amp;gt;
      html,
      body,
      #viewDiv {
        padding: 0;
        margin: 0;
        height: 100%;
        width: 100%;
      }
    &amp;lt;/style&amp;gt;

    &amp;lt;link
      rel="stylesheet"
      href="https://js.arcgis.com/4.20/esri/themes/light/main.css"
    /&amp;gt;
    &amp;lt;script src="https://js.arcgis.com/4.20/"&amp;gt;&amp;lt;/script&amp;gt;

    &amp;lt;script&amp;gt;
		require(["esri/Map", "esri/views/MapView", "esri/layers/FeatureLayer"], (Map, MapView, FeatureLayer) =&amp;gt; {
			const markerSym = {
			  type: "simple",
			  symbol:{
				type: "simple-marker",
				style: "circle",
				color: [108, 199, 143],
				size: 11, 
				outline: {
				  color: "blue",
				  width: 1
				}
			  } 
			};        

			const brewLayer = new FeatureLayer({
			  url: "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/BreweriesCA/FeatureServer/0",
			  renderer: markerSym,
			  visible: true
			})        

			let map = new Map({
			  basemap: "topo-vector",
			  layers: brewLayer
			});

			let view = new MapView({
			  container: "viewDiv",
			  map: map,
			  zoom: 8,
			  center: [-116.1118, 33.17233]
			});

			view.when(() =&amp;gt; {
				view.on("pointer-move", evt =&amp;gt; {
					view.graphics.removeAll();
					view.hitTest(evt).then(response =&amp;gt; {
						if (response.results.length &amp;gt; 0 ) {
							let graphic = response.results[0].graphic;
							graphic.symbol = {
								type: "simple-marker",
								style: "circle",
								color: [25, 97, 73],
								size: 11,
								outline:
								{
								  color: "white",
								  width: 1
								}
							}
							view.graphics.add(graphic);
						}
					})
				});
			})
		});
    &amp;lt;/script&amp;gt;
  &amp;lt;/head&amp;gt;

  &amp;lt;body&amp;gt;
    &amp;lt;div id="viewDiv"&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 12 Jul 2021 19:10:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/stop-flashing-of-graphic-on-mouse-pointer-hovering/m-p/1077976#M73828</guid>
      <dc:creator>victhomas</dc:creator>
      <dc:date>2021-07-12T19:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: Stop flashing of graphic on mouse pointer hovering</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/stop-flashing-of-graphic-on-mouse-pointer-hovering/m-p/1077992#M73830</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/148685"&gt;@victhomas&lt;/a&gt;&amp;nbsp; Here is the fix for that.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta charset="utf-8" /&amp;gt;
    &amp;lt;meta
      name="viewport"
      content="initial-scale=1,maximum-scale=1,user-scalable=no"
    /&amp;gt;


    &amp;lt;style&amp;gt;
      html,
      body,
      #viewDiv {
        padding: 0;
        margin: 0;
        height: 100%;
        width: 100%;
      }
    &amp;lt;/style&amp;gt;

    &amp;lt;link
      rel="stylesheet"
      href="https://js.arcgis.com/4.20/esri/themes/light/main.css"
    /&amp;gt;
    &amp;lt;script src="https://js.arcgis.com/4.20/"&amp;gt;&amp;lt;/script&amp;gt;

    &amp;lt;script&amp;gt;
		require(["esri/Map", "esri/views/MapView", "esri/layers/FeatureLayer"], (Map, MapView, FeatureLayer) =&amp;gt; {
			const markerSym = {
			  type: "simple",
			  symbol:{
				type: "simple-marker",
				style: "circle",
				color: [108, 199, 143],
				size: 11, 
				outline: {
				  color: "blue",
				  width: 1
				}
			  } 
			};        

			const brewLayer = new FeatureLayer({
			  url: "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/BreweriesCA/FeatureServer/0",
			  renderer: markerSym,
			  visible: true
			})        

			let map = new Map({
			  basemap: "topo-vector",
			  layers: brewLayer
			});

			let view = new MapView({
			  container: "viewDiv",
			  map: map,
			  zoom: 8,
			  center: [-116.1118, 33.17233]
			});

			view.when(() =&amp;gt; {
        let lastFID = null;
				view.on("pointer-move", evt =&amp;gt; {
					view.hitTest(evt).then(response =&amp;gt; {
						if (response.results.length &amp;gt; 0 ) {
              if(lastFID === response.results[0].graphic.attributes["FID"]){
                return;
              }
              view.graphics.removeAll();
							let graphic = response.results[0].graphic;
							graphic.symbol = {
								type: "simple-marker",
								style: "circle",
								color: [25, 97, 73],
								size: 11,
								outline:
								{
								  color: "white",
								  width: 1
								}
							}
              lastFID = graphic.attributes["FID"];
							view.graphics.add(graphic);
						}
					})
				});
			})
		});
    &amp;lt;/script&amp;gt;
  &amp;lt;/head&amp;gt;

  &amp;lt;body&amp;gt;
    &amp;lt;div id="viewDiv"&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 12 Jul 2021 19:42:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/stop-flashing-of-graphic-on-mouse-pointer-hovering/m-p/1077992#M73830</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-07-12T19:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: Stop flashing of graphic on mouse pointer hovering</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/stop-flashing-of-graphic-on-mouse-pointer-hovering/m-p/1080045#M73920</link>
      <description>&lt;P&gt;Thank you Robert&lt;/P&gt;</description>
      <pubDate>Sun, 18 Jul 2021 02:19:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/stop-flashing-of-graphic-on-mouse-pointer-hovering/m-p/1080045#M73920</guid>
      <dc:creator>victhomas</dc:creator>
      <dc:date>2021-07-18T02:19:05Z</dc:date>
    </item>
  </channel>
</rss>

