<?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: Disable popup when selecting graphic (4.x) in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-popup-when-selecting-graphic-4-x/m-p/630538#M58831</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As complement&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read this as well&lt;/P&gt;&lt;P&gt;&lt;A class="" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html" style="color: #2989c5; text-decoration: none;" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html"&gt;SketchViewModel | ArcGIS API for JavaScript 4.12&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At state start&amp;nbsp;&lt;/P&gt;&lt;P&gt;You&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;disabled&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;the popup with&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;view.popup.autoOpenEnabled =&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;false&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;And at state -&amp;gt; complete and cancel (re-enabled the popup)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;view.popup.autoOpenEnabled =&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;true&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Aug 2019 07:14:01 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2019-08-08T07:14:01Z</dc:date>
    <item>
      <title>Disable popup when selecting graphic (4.x)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-popup-when-selecting-graphic-4-x/m-p/630536#M58829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've built an application that includes the out-of-the box&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html"&gt;Sketch Widget&lt;/A&gt;. I need to disable the popup for active operational layers when selecting graphics created with the widget (to delete them or use the move/reshape tools). As it is, when the user selects a graphic, it opens the popup for any active layers beneath, meaning they have to close or dock the graphic to get it out of the way before they can interact with the graphic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume I need to get the mappoint based on a click event, check it against the graphic's geometry, and set enablePopup to false. Here's my stab at it (at least for polygon graphics):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;map.on("click", function (evt) {&lt;BR /&gt; var g = tempGraphicsLayer.graphics;&lt;BR /&gt; for (var loopCnt = 0; loopCnt &amp;lt; g.length; loopCnt++) {&lt;BR /&gt; if((g[loopCnt].geometry).contains(evt.mapPoint)){&lt;/P&gt;&lt;P&gt;parcels_noLabel.enablePopup=false&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt; }&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Console shows tempGraphicsLayer as undefined (therefore can't read property "contains").&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help is much appreciated! Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Aug 2019 17:25:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-popup-when-selecting-graphic-4-x/m-p/630536#M58829</guid>
      <dc:creator>JosephRhodes3</dc:creator>
      <dc:date>2019-08-02T17:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: Disable popup when selecting graphic (4.x)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-popup-when-selecting-graphic-4-x/m-p/630537#M58830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems like you're coding this from a 3.x perspective. In 4.x, the map doesn't have a click event, but the mapView does. Take a look at &lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/guide/maps-and-views/#interacting-with-the-view" title="https://developers.arcgis.com/javascript/latest/guide/maps-and-views/#interacting-with-the-view"&gt;Maps and Views | ArcGIS API for JavaScript 4.12&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take a look at this discussion about disabling popups when using the Sketch widget: &lt;A href="https://community.esri.com/message/746309-disable-popups-while-drawingsketching-graphics-js-api-46"&gt;https://community.esri.com/message/746309-disable-popups-while-drawingsketching-graphics-js-api-46&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Aug 2019 18:14:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-popup-when-selecting-graphic-4-x/m-p/630537#M58830</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2019-08-02T18:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Disable popup when selecting graphic (4.x)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-popup-when-selecting-graphic-4-x/m-p/630538#M58831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As complement&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read this as well&lt;/P&gt;&lt;P&gt;&lt;A class="" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html" style="color: #2989c5; text-decoration: none;" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html"&gt;SketchViewModel | ArcGIS API for JavaScript 4.12&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At state start&amp;nbsp;&lt;/P&gt;&lt;P&gt;You&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;disabled&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;the popup with&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;view.popup.autoOpenEnabled =&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;false&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;And at state -&amp;gt; complete and cancel (re-enabled the popup)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;view.popup.autoOpenEnabled =&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;true&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Aug 2019 07:14:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-popup-when-selecting-graphic-4-x/m-p/630538#M58831</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2019-08-08T07:14:01Z</dc:date>
    </item>
  </channel>
</rss>

