<?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: Loading popup on click in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loading-popup-on-click/m-p/1660988#M87808</link>
    <description>&lt;P&gt;Yeah, any time you want to take over the Popup on click, you need to set this. Note, this only disables popup on click, it won't disable the Search popup.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Oct 2025 15:17:49 GMT</pubDate>
    <dc:creator>ReneRubalcava</dc:creator>
    <dc:date>2025-10-27T15:17:49Z</dc:date>
    <item>
      <title>Loading popup on click</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loading-popup-on-click/m-p/1660903#M87802</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;My problem :&amp;nbsp;&lt;BR /&gt;I'm trying to display a popup with the location clicked each time the user click on the map.&lt;BR /&gt;But the popup is not displayed each time. It pops up only a few time and I can't find why.&lt;/P&gt;&lt;P&gt;My code :&lt;BR /&gt;I'm using ArcGIS SDK 4.33 + webcomponents.&lt;/P&gt;&lt;P&gt;Here is part of my code with comments :&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Map
self._arcgisMap = document.createElement("arcgis-map");

self._arcgisMap.viewOnReady().then(function() {
	self._map = self._arcgisMap.map;
	self._view = self._arcgisMap.view;
	console.debug("MapView Ready");
	
	self._view.popup.autoOpenEnabled = true;

	require(["esri/core/reactiveUtils"], function(reactiveUtils) {

		reactiveUtils.on(
			() =&amp;gt; self._view,
			"click",
			(event) =&amp;gt; {
				self._view.hitTest(event).then((response) =&amp;gt; {
					const results = response.results;

					// If the click is on a feature : do not display popup
					const featureResults = results
						.map(r =&amp;gt; r.graphic?.layer)
						.filter(layer =&amp;gt; layer &amp;amp;&amp;amp; layer.declaredClass === "esri.layers.FeatureLayer");

					const stageTouched = featureResults.some(layer =&amp;gt; {
						return self._allLayers.some(layerInfo =&amp;gt; layerInfo._sourceType === "stage" &amp;amp;&amp;amp; layerInfo.url === layer.url);
					});

					if (!stageTouched) {

						const mapPoint= event.mapPoint;
						const lat = Math.round(mapPoint.latitude * 1000) / 1000;
						const lon = Math.round(mapPoint.longitude * 1000) / 1000;

						// This log is displayed each time I click on an empty location
						// So this code is working
						console.log("Click:", `Location: ${lat}°N, ${lon}°E`)

						// The popup is displayed only when it want...
						// I can't find why it is not displayed each time
						self._arcgisMap.view.popup.open({
							title: `Location: ${lat}°N, ${lon}°E`,
							location: mapPoint,
							visible: true
						})

					}
				})
			}
		);

	});

});&lt;/LI-CODE&gt;&lt;P&gt;Behaviour and tests :&lt;BR /&gt;My map is working, I can navigate and I have no error into the console.&lt;/P&gt;&lt;P&gt;I've tryed the&amp;nbsp;openPopup method but I have the same result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Feel free to ask for more details if needed.&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Oct 2025 09:44:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loading-popup-on-click/m-p/1660903#M87802</guid>
      <dc:creator>ArthurBazin</dc:creator>
      <dc:date>2025-10-27T09:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: Loading popup on click</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loading-popup-on-click/m-p/1660917#M87803</link>
      <description>&lt;P&gt;Ok, I needed to desable popups...&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;self._arcgisMap.popupDisabled = true;&lt;/LI-CODE&gt;&lt;P&gt;Not easy to catch &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Oct 2025 10:39:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loading-popup-on-click/m-p/1660917#M87803</guid>
      <dc:creator>ArthurBazin</dc:creator>
      <dc:date>2025-10-27T10:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: Loading popup on click</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loading-popup-on-click/m-p/1660988#M87808</link>
      <description>&lt;P&gt;Yeah, any time you want to take over the Popup on click, you need to set this. Note, this only disables popup on click, it won't disable the Search popup.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Oct 2025 15:17:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loading-popup-on-click/m-p/1660988#M87808</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2025-10-27T15:17:49Z</dc:date>
    </item>
  </channel>
</rss>

