<?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: Restrict Mouse Hover to layer extent in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/restrict-mouse-hover-to-layer-extent/m-p/674188#M62828</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Veena,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; You are listening for mouse-over on the PollingLayer and then adding a graphic and setting the onMouseOut event to close the popup when leaving the graphic. So your issue is that as soon as you leave the graphic you are likely over the PollingLayer still and the popup is fired again. Why not use mouse-out event on the PolingLayer to close the popup?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Apr 2018 15:17:21 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2018-04-11T15:17:21Z</dc:date>
    <item>
      <title>Restrict Mouse Hover to layer extent</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/restrict-mouse-hover-to-layer-extent/m-p/674187#M62827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using mouse hover event to display information,Below code is working but i want restrict mouse hovering to layer extent.If mouse cursor is out of layer extent also graphics and pop is not clearing.Can any help to restrict this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PollingLayer.on("mouse-over", function (evt) { Assemblymap.infoWindow.hide(); dijitPopup.close(dialog); var t = "&lt;STRONG&gt;${POLIN_STATN_NAME}&lt;/STRONG&gt;" var content = esriLang.substitute(evt.graphic.attributes, t); highlightGraphic = new Graphic(evt.graphic.geometry, highlightSymbol); Assemblymap.graphics.add(highlightGraphic); dialog.setContent(content); domStyle.set(dialog.domNode, "opacity", 0.85); dijitPopup.open({ popup: dialog, x: evt.pageX, y: evt.pageY }); }); dojo.connect(Assemblymap.graphics, "onMouseOut", function (evt) { dijitPopup.close(dialog); Assemblymap.graphics.clear(); // Assemblymap.setMapCursor("default"); });&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Apr 2018 14:25:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/restrict-mouse-hover-to-layer-extent/m-p/674187#M62827</guid>
      <dc:creator>VeenaHosur</dc:creator>
      <dc:date>2018-04-07T14:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: Restrict Mouse Hover to layer extent</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/restrict-mouse-hover-to-layer-extent/m-p/674188#M62828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Veena,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; You are listening for mouse-over on the PollingLayer and then adding a graphic and setting the onMouseOut event to close the popup when leaving the graphic. So your issue is that as soon as you leave the graphic you are likely over the PollingLayer still and the popup is fired again. Why not use mouse-out event on the PolingLayer to close the popup?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2018 15:17:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/restrict-mouse-hover-to-layer-extent/m-p/674188#M62828</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-04-11T15:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: Restrict Mouse Hover to layer extent</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/restrict-mouse-hover-to-layer-extent/m-p/674189#M62829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;PollingLayer.graphics.on("mouse-out", closeDialog);&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried with this but its not firing closedDialog&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Apr 2018 13:24:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/restrict-mouse-hover-to-layer-extent/m-p/674189#M62829</guid>
      <dc:creator>VeenaHosur</dc:creator>
      <dc:date>2018-04-12T13:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: Restrict Mouse Hover to layer extent</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/restrict-mouse-hover-to-layer-extent/m-p/674190#M62830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Venna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Can you provide all of your code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Apr 2018 13:52:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/restrict-mouse-hover-to-layer-extent/m-p/674190#M62830</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-04-12T13:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Restrict Mouse Hover to layer extent</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/restrict-mouse-hover-to-layer-extent/m-p/674191#M62831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PollingLayer.setDefinitionExpression("ASBLY_CSTNY_NUM ='" + assemblycode + "'"); Assemblymap.addLayer(PollingLayer); dialog = new TooltipDialog({ id: "tooltipDialog1", style: "position: absolute; width: 250px; font: normal normal normal 10pt Helvetica;z-index:100" }); dialog.startup(); Assemblymap.on("load", function () { Assemblymap.graphics.enableMouseEvents(); Assemblymap.graphics.on("mouse-out", closeDialog); }); PollingLayer.on("mouse-over", function (evt) { $('#ContentPlaceHolder1_lblmyEPIC').hide(); $('#ContentPlaceHolder1_lblPSName').hide(); Assemblymap.infoWindow.hide(); var pscd = evt.graphic.attributes.PSCode; var assemblycode = evt.graphic.attributes.ASBLY_CSTNY_NUM; var t ="&lt;STRONG&gt;M&lt;/STRONG&gt;:" + Male + "&amp;nbsp;&amp;nbsp;" + "&lt;STRONG&gt;F&lt;/STRONG&gt;:" + Female + "&lt;BR /&gt;" + "&lt;STRONG&gt;Total&lt;/STRONG&gt;:" + Total + "&lt;BR /&gt;" var content = esriLang.substitute(evt.graphic.attributes, t); highlightGraphic = new Graphic(evt.graphic.geometry, highlightSymbol); Assemblymap.graphics.add(highlightGraphic); dialog.setContent(content); domStyle.set(dialog.domNode, "opacity", 0.85); dijitPopup.open({ popup: dialog, x: evt.pageX, y: evt.pageY }); }); function closeDialog() { // alert('hi'); Assemblymap.graphics.clear(); Assemblymap.setMapCursor("default"); dijitPopup.close(dialog); }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am adding Polling layer after &lt;SPAN&gt;setDefinitionExpression&amp;nbsp; not whole layer&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Apr 2018 13:57:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/restrict-mouse-hover-to-layer-extent/m-p/674191#M62831</guid>
      <dc:creator>VeenaHosur</dc:creator>
      <dc:date>2018-04-12T13:57:32Z</dc:date>
    </item>
  </channel>
</rss>

