<?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: popup position in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/popup-position/m-p/579069#M3908</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would manually setting an anchor help you at all? If you're using the Popup class, it's actually supposed to compute this automatically by default... Maybe setting it to the middle would decrease the effects of having the pop-up appear off screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https://developers.arcgis.com/javascript/jsapi/popup.html#anchor" rel="nofollow" target="_blank"&gt;https://developers.arcgis.com/javascript/jsapi/popup.html#anchor&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, reposition may be helpful:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https://developers.arcgis.com/javascript/jsapi/popup.html#reposition" rel="nofollow" target="_blank"&gt;https://developers.arcgis.com/javascript/jsapi/popup.html#reposition&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've had similar issues in the past embedding maps within an iFrame - the pop-up would appear slightly out-of-frame... if the point feature is too far out, the anchor should reset upon re-opening (say from right/center to left), but this doesn't always happen, I've noticed. I've made a lot of changes recently, and it seems it does a better job now, so it may have been an issue with the container... I'm not sure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wonder if you could manually have the pop-up repositioned after a feature/map event, say a pan/zoom end. I'm trying this now...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Jul 2015 12:57:51 GMT</pubDate>
    <dc:creator>ChrisSmith7</dc:creator>
    <dc:date>2015-07-09T12:57:51Z</dc:date>
    <item>
      <title>popup position</title>
      <link>https://community.esri.com/t5/developers-questions/popup-position/m-p/579068#M3907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I add to my map a popup&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="font-family: Consolas, monospace; font-size: 15px;"&gt;&lt;SPAN class="fctbStyle1"&gt;var&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt; popup = &lt;/SPAN&gt;&lt;SPAN class="fctbStyle1"&gt;new&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt; Popup({
&amp;nbsp; fillSymbol: &lt;/SPAN&gt;&lt;SPAN class="fctbStyle1"&gt;new&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt; SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID,
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="fctbStyle1"&gt;new&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt; SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID,
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="fctbStyle1"&gt;new&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt; Color([&lt;/SPAN&gt;&lt;SPAN class="fctbStyle5"&gt;255&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;, &lt;/SPAN&gt;&lt;SPAN class="fctbStyle5"&gt;0&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;, &lt;/SPAN&gt;&lt;SPAN class="fctbStyle5"&gt;0&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;]), &lt;/SPAN&gt;&lt;SPAN class="fctbStyle5"&gt;2&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;), &lt;/SPAN&gt;&lt;SPAN class="fctbStyle1"&gt;new&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt; Color([&lt;/SPAN&gt;&lt;SPAN class="fctbStyle5"&gt;255&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;, &lt;/SPAN&gt;&lt;SPAN class="fctbStyle5"&gt;255&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;, &lt;/SPAN&gt;&lt;SPAN class="fctbStyle5"&gt;0&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;, &lt;/SPAN&gt;&lt;SPAN class="fctbStyle5"&gt;0.25&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;])),
&amp;nbsp; titleInBody: &lt;/SPAN&gt;&lt;SPAN class="fctbStyle1"&gt;true&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;
&amp;nbsp; }, domConstruct.create(&lt;/SPAN&gt;&lt;SPAN class="fctbStyle4"&gt;"div"&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;));

&amp;nbsp; domClass.add(popup.domNode, &lt;/SPAN&gt;&lt;SPAN class="fctbStyle4"&gt;"myTheme"&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and set its content:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="font-family: Consolas, monospace; font-size: 15px;"&gt;&lt;SPAN class="fctbNone"&gt; &lt;/SPAN&gt;&lt;SPAN class="fctbStyle1"&gt;var&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt; information = &lt;/SPAN&gt;&lt;SPAN class="fctbStyle1"&gt;new&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt; PopupTemplate({
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="fctbStyle4"&gt;"title"&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;: &lt;/SPAN&gt;&lt;SPAN class="fctbStyle4"&gt;"{Field name}"&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;,
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="fctbStyle4"&gt;"fieldInfos"&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;: [{
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="fctbStyle4"&gt;"fieldName"&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;: &lt;/SPAN&gt;&lt;SPAN class="fctbStyle4"&gt;"&lt;SPAN style="font-family: Consolas, monospace; font-size: 15px;"&gt;Field name&lt;/SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;,
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="fctbStyle4"&gt;"format"&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;: {
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="fctbStyle4"&gt;"places"&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;: &lt;/SPAN&gt;&lt;SPAN class="fctbStyle5"&gt;2&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;,
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="fctbStyle4"&gt;"digitSeparator"&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;: &lt;/SPAN&gt;&lt;SPAN class="fctbStyle1"&gt;true&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;
&amp;nbsp; }
&amp;nbsp; }, {
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="fctbStyle4"&gt;"fieldName"&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;: &lt;/SPAN&gt;&lt;SPAN class="fctbStyle4"&gt;"&lt;SPAN style="font-family: Consolas, monospace; font-size: 15px;"&gt;Field name&lt;/SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;,
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="fctbStyle4"&gt;"format"&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;: {
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="fctbStyle4"&gt;"places"&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;: &lt;/SPAN&gt;&lt;SPAN class="fctbStyle5"&gt;2&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;,
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="fctbStyle4"&gt;"digitSeparator"&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;: &lt;/SPAN&gt;&lt;SPAN class="fctbStyle1"&gt;true&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;
&amp;nbsp; }
&amp;nbsp; }],
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="fctbStyle4"&gt;"description"&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;: &lt;/SPAN&gt;&lt;SPAN class="fctbStyle4"&gt;" html content&lt;/SPAN&gt;&lt;SPAN class="fctbStyle4"&gt;"&lt;/SPAN&gt;&lt;SPAN class="fctbNone"&gt;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp; });&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and set this popupTemplate object to the featureLayer and set popup object to map&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the problem is that the position of popup does not fit with screen look to image:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="popup.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/116095_popup.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;as you see if the feature is not on center of screen but on sides, the popup is displayed like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is a mobile application and mobile screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help as you fast as you can&lt;/P&gt;&lt;P&gt;and if there is another component can do this better please tell me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:53:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/popup-position/m-p/579068#M3907</guid>
      <dc:creator>sundussabbah</dc:creator>
      <dc:date>2021-12-12T00:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: popup position</title>
      <link>https://community.esri.com/t5/developers-questions/popup-position/m-p/579069#M3908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would manually setting an anchor help you at all? If you're using the Popup class, it's actually supposed to compute this automatically by default... Maybe setting it to the middle would decrease the effects of having the pop-up appear off screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https://developers.arcgis.com/javascript/jsapi/popup.html#anchor" rel="nofollow" target="_blank"&gt;https://developers.arcgis.com/javascript/jsapi/popup.html#anchor&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, reposition may be helpful:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https://developers.arcgis.com/javascript/jsapi/popup.html#reposition" rel="nofollow" target="_blank"&gt;https://developers.arcgis.com/javascript/jsapi/popup.html#reposition&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've had similar issues in the past embedding maps within an iFrame - the pop-up would appear slightly out-of-frame... if the point feature is too far out, the anchor should reset upon re-opening (say from right/center to left), but this doesn't always happen, I've noticed. I've made a lot of changes recently, and it seems it does a better job now, so it may have been an issue with the container... I'm not sure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wonder if you could manually have the pop-up repositioned after a feature/map event, say a pan/zoom end. I'm trying this now...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 12:57:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/popup-position/m-p/579069#M3908</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2015-07-09T12:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: popup position</title>
      <link>https://community.esri.com/t5/developers-questions/popup-position/m-p/579070#M3909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Seems to work - try this example in the sandbox:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=fl_popup" title="http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=fl_popup" rel="nofollow noopener noreferrer" target="_blank"&gt;ArcGIS API for JavaScript Sandbox&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adding something like this appears to help a bit when the pop-up is panned off-screen:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.on("pan-end", reposition);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function reposition() {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (popup.isShowing === true){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; popup.reposition();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log('pop-up repositioned...');
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I added this bit of code right after line 125.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:53:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/popup-position/m-p/579070#M3909</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2021-12-12T00:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: popup position</title>
      <link>https://community.esri.com/t5/developers-questions/popup-position/m-p/579071#M3910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you for reply, but unfortunately, nothing change!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Jul 2015 06:28:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/popup-position/m-p/579071#M3910</guid>
      <dc:creator>sundussabbah</dc:creator>
      <dc:date>2015-07-11T06:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: popup position</title>
      <link>https://community.esri.com/t5/developers-questions/popup-position/m-p/579072#M3911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Strange - what version of the API are you using? I did a bit more digging and found another user described a similar situation, though they did not attach a screen capture, so I can't be sure. Have a look at the discussion in:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/message/78001"&gt;InfoWindoLite popup spilling off of map on mobile or small browser window&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There's also a link with a solution that worked for some people here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/32141"&gt;Auto-panning map so that infowindow is fully visible&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Jul 2015 17:04:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/popup-position/m-p/579072#M3911</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2015-07-11T17:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: popup position</title>
      <link>https://community.esri.com/t5/developers-questions/popup-position/m-p/579073#M3912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This approach worked for me. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 00:06:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/popup-position/m-p/579073#M3912</guid>
      <dc:creator>SrihariManepalli</dc:creator>
      <dc:date>2015-07-24T00:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: popup position</title>
      <link>https://community.esri.com/t5/developers-questions/popup-position/m-p/579074#M3913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks this works for me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jan 2016 13:06:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/popup-position/m-p/579074#M3913</guid>
      <dc:creator>jimmiraza</dc:creator>
      <dc:date>2016-01-04T13:06:23Z</dc:date>
    </item>
  </channel>
</rss>

