<?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 Anchor Popup to Result Point in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/anchor-popup-to-result-point/m-p/1359823#M83090</link>
    <description>&lt;P&gt;So, I have a map and some points on it. When someone clicks on a point to view the popup(popupTemplate), and then zooms in, the popup is anchored to the exact point where they clicked, so it could be a few streets away if they zoom in.&lt;BR /&gt;&lt;BR /&gt;Is there a way to anchor the popups to open on the spot of the symbol that was clicked?&lt;/P&gt;&lt;P&gt;I attached an image, so ideally, I'd want the popup to be centered from that blue dot&lt;/P&gt;</description>
    <pubDate>Tue, 12 Dec 2023 18:13:21 GMT</pubDate>
    <dc:creator>TristanG</dc:creator>
    <dc:date>2023-12-12T18:13:21Z</dc:date>
    <item>
      <title>Anchor Popup to Result Point</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/anchor-popup-to-result-point/m-p/1359823#M83090</link>
      <description>&lt;P&gt;So, I have a map and some points on it. When someone clicks on a point to view the popup(popupTemplate), and then zooms in, the popup is anchored to the exact point where they clicked, so it could be a few streets away if they zoom in.&lt;BR /&gt;&lt;BR /&gt;Is there a way to anchor the popups to open on the spot of the symbol that was clicked?&lt;/P&gt;&lt;P&gt;I attached an image, so ideally, I'd want the popup to be centered from that blue dot&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 18:13:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/anchor-popup-to-result-point/m-p/1359823#M83090</guid>
      <dc:creator>TristanG</dc:creator>
      <dc:date>2023-12-12T18:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: Anchor Popup to Result Point</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/anchor-popup-to-result-point/m-p/1360073#M83093</link>
      <description>&lt;P&gt;This isn't the prettiest thing, but it works; I would recommend adding it directly after creating your MapView.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;reactiveUtils.when(() =&amp;gt; view.popup?.actions, ()=&amp;gt;{
	view.popup.watch("selectedFeatureIndex, visible, location", function(newValue, oldValue, propertyName, target) {
		if ((target.visible) &amp;amp;&amp;amp; (target.selectedFeatureIndex === 0) &amp;amp;&amp;amp; (target.selectedFeature.geometry?.type == "point") &amp;amp;&amp;amp; (!target.selectedFeature.geometry.equals(target.location)))
			target.location = target.selectedFeature.geometry.clone();
	});
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(Note that reactiveUtils is &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-core-reactiveUtils.html" target="_self"&gt;esri/core/reactiveUtils&lt;/A&gt;)&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 23:01:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/anchor-popup-to-result-point/m-p/1360073#M83093</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2023-12-12T23:01:55Z</dc:date>
    </item>
  </channel>
</rss>

