<?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 searchWidget use configured Popup from map services in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/searchwidget-use-configured-popup-from-map/m-p/1417496#M84468</link>
    <description>&lt;P&gt;When using the searchWidget, instead of using a popup template, how do I get it to open the popup that was preconfigured in the map service when published through ArcGIS Pro?&amp;nbsp; &amp;nbsp;I want searchWidget to display the popup that opens when I click a feature on the map.&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 May 2024 12:38:13 GMT</pubDate>
    <dc:creator>PLadd</dc:creator>
    <dc:date>2024-05-01T12:38:13Z</dc:date>
    <item>
      <title>searchWidget use configured Popup from map services</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/searchwidget-use-configured-popup-from-map/m-p/1417496#M84468</link>
      <description>&lt;P&gt;When using the searchWidget, instead of using a popup template, how do I get it to open the popup that was preconfigured in the map service when published through ArcGIS Pro?&amp;nbsp; &amp;nbsp;I want searchWidget to display the popup that opens when I click a feature on the map.&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 12:38:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/searchwidget-use-configured-popup-from-map/m-p/1417496#M84468</guid>
      <dc:creator>PLadd</dc:creator>
      <dc:date>2024-05-01T12:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: searchWidget use configured Popup from map services</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/searchwidget-use-configured-popup-from-map/m-p/1418248#M84486</link>
      <description>&lt;P&gt;Does it work if you set the source's &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#popupTemplate" target="_self"&gt;popupTemplate&lt;/A&gt; from that of the layer?&amp;nbsp; For example:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function createSource(layer) {
	var source = new LayerSearchSource({
		//etc
		layer: layer,
		popupEnabled: true,
		popupTemplate: null,
		//etc
	});

	layer.when(function() {
		source.popupTemplate = layer.popupTemplate;
	});

	return source;
}&lt;/LI-CODE&gt;&lt;P&gt;That should work for a &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html" target="_self"&gt;FeatureLayer&lt;/A&gt;.&amp;nbsp; If you're using a &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html" target="_self"&gt;MapImageLayer&lt;/A&gt;, you'd have to get the popupTemplate from within the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#sublayers" target="_self"&gt;subLayers&lt;/A&gt; collection instead.&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2024 17:29:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/searchwidget-use-configured-popup-from-map/m-p/1418248#M84486</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2024-05-02T17:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: searchWidget use configured Popup from map services</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/searchwidget-use-configured-popup-from-map/m-p/1418778#M84499</link>
      <description>&lt;P&gt;Thanks for the reply. I tried using your suggested changes but they didn't achieve what I am trying to do.&lt;/P&gt;&lt;P&gt;I think the popup that I'm getting in code is the one generated off the the graphic that's being drawn by the searchWidget. After the search completes and zooms to the parcel, if I then click on the same parcel in the view, I get two popups, the same one created by the searchWidget (the graphic is still on the map) and the ArcGIS Pro configured popup from the featureLayer (the one I want to popup from searchWidget).&lt;/P&gt;&lt;P&gt;It seems odd to me that I can't find any sort of property setting in the javascript API that makes reference to getting the popup to open the configured settings from ArcGIS Pro. In Web AppBuilder, this is a default behavior. I downloaded one of my existing WAB sites but couldn't quite re-engineer it enough to figure out how they go about getting this popup behavior to work.&lt;/P&gt;&lt;P&gt;I'll keep digging and post if I find anything . . . .&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 03 May 2024 15:37:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/searchwidget-use-configured-popup-from-map/m-p/1418778#M84499</guid>
      <dc:creator>PLadd</dc:creator>
      <dc:date>2024-05-03T15:37:04Z</dc:date>
    </item>
  </channel>
</rss>

