<?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: Infowindow is not entirely visible in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-is-not-entirely-visible/m-p/654226#M60962</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Are you using something like this to show your info window:&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint));&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, that is the code I'm using. Here's a simplified example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

function createMap() {
&amp;nbsp;&amp;nbsp;&amp;nbsp; try {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //instantiate the map and add layers etc
 Utils.mapAndBaseLayer(CWLSettings.cityExtent);

 dojo.connect(map, "onLoad", function() {dojo.connect(map, "onClick", executeQueryTask);});
 dojo.connect(map.infoWindow, "onHide", function() {map.graphics.clear();});
 queryTask = new esri.tasks.QueryTask(cwlService.Url + '/' + shapeLayerID);

 query = new esri.tasks.Query();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.returnGeometry = true;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.outFields = ["NAME", "LAYER"];

&amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (ex) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(ex);
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}


function executeQueryTask(evt) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.infoWindow.hide();
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.clear();
&amp;nbsp;&amp;nbsp;&amp;nbsp; featureSet = null;

&amp;nbsp;&amp;nbsp;&amp;nbsp; query.geometry = evt.mapPoint;

&amp;nbsp;&amp;nbsp;&amp;nbsp; //Execute task and call showResults on completion
&amp;nbsp;&amp;nbsp;&amp;nbsp; queryTask.execute(query, function(fset) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (fset.features.length === 1) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; showFeature(fset.features[0],evt);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else if (fset.features.length !== 0) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; showFeatureSet(fset,evt);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; });
}

function showFeature(feature,evt) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.clear();

&amp;nbsp;&amp;nbsp;&amp;nbsp; var symbol = ... //simple marker symbol
&amp;nbsp;&amp;nbsp;&amp;nbsp; feature.setSymbol(symbol);

&amp;nbsp;&amp;nbsp;&amp;nbsp; var attr = feature.attributes;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var title = attr.NAME ? attr.NAME : attr.LAYER;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var content = title;
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.add(feature);
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.infoWindow.setTitle(title);
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.infoWindow.setContent(content);

&amp;nbsp;&amp;nbsp;&amp;nbsp; (evt) ? map.infoWindow.show(evt.screenPoint,map.getInfoWindowAnchor(evt.screenPoint)) : null;
}
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 03:43:19 GMT</pubDate>
    <dc:creator>JamesBurton</dc:creator>
    <dc:date>2021-12-12T03:43:19Z</dc:date>
    <item>
      <title>Infowindow is not entirely visible</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-is-not-entirely-visible/m-p/654222#M60958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a map displayed in a fixed-width table, 600px wide, which has an infoWindow showing details of features. If a feature is near the edge of the map, the inforWindow is not always placed correctly, so part of it is invisible. How do I make the infowindow place itself so that it can all be seen? Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 15:24:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-is-not-entirely-visible/m-p/654222#M60958</guid>
      <dc:creator>JamesBurton</dc:creator>
      <dc:date>2011-02-18T15:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: Infowindow is not entirely visible</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-is-not-entirely-visible/m-p/654223#M60959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are you using something like this to show your info window:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint));&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 16:04:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-is-not-entirely-visible/m-p/654223#M60959</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2011-02-18T16:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: Infowindow is not entirely visible</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-is-not-entirely-visible/m-p/654224#M60960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We are having the same problem, and yes we are using code that looks like that.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 19:19:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-is-not-entirely-visible/m-p/654224#M60960</guid>
      <dc:creator>PaulForbess</dc:creator>
      <dc:date>2011-02-18T19:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: Infowindow is not entirely visible</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-is-not-entirely-visible/m-p/654225#M60961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Post a simple example that demonstrates the issue?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 21:47:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-is-not-entirely-visible/m-p/654225#M60961</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2011-02-18T21:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: Infowindow is not entirely visible</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-is-not-entirely-visible/m-p/654226#M60962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Are you using something like this to show your info window:&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint));&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, that is the code I'm using. Here's a simplified example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

function createMap() {
&amp;nbsp;&amp;nbsp;&amp;nbsp; try {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //instantiate the map and add layers etc
 Utils.mapAndBaseLayer(CWLSettings.cityExtent);

 dojo.connect(map, "onLoad", function() {dojo.connect(map, "onClick", executeQueryTask);});
 dojo.connect(map.infoWindow, "onHide", function() {map.graphics.clear();});
 queryTask = new esri.tasks.QueryTask(cwlService.Url + '/' + shapeLayerID);

 query = new esri.tasks.Query();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.returnGeometry = true;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.outFields = ["NAME", "LAYER"];

&amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (ex) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(ex);
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}


function executeQueryTask(evt) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.infoWindow.hide();
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.clear();
&amp;nbsp;&amp;nbsp;&amp;nbsp; featureSet = null;

&amp;nbsp;&amp;nbsp;&amp;nbsp; query.geometry = evt.mapPoint;

&amp;nbsp;&amp;nbsp;&amp;nbsp; //Execute task and call showResults on completion
&amp;nbsp;&amp;nbsp;&amp;nbsp; queryTask.execute(query, function(fset) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (fset.features.length === 1) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; showFeature(fset.features[0],evt);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else if (fset.features.length !== 0) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; showFeatureSet(fset,evt);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; });
}

function showFeature(feature,evt) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.clear();

&amp;nbsp;&amp;nbsp;&amp;nbsp; var symbol = ... //simple marker symbol
&amp;nbsp;&amp;nbsp;&amp;nbsp; feature.setSymbol(symbol);

&amp;nbsp;&amp;nbsp;&amp;nbsp; var attr = feature.attributes;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var title = attr.NAME ? attr.NAME : attr.LAYER;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var content = title;
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.add(feature);
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.infoWindow.setTitle(title);
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.infoWindow.setContent(content);

&amp;nbsp;&amp;nbsp;&amp;nbsp; (evt) ? map.infoWindow.show(evt.screenPoint,map.getInfoWindowAnchor(evt.screenPoint)) : null;
}
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:43:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/infowindow-is-not-entirely-visible/m-p/654226#M60962</guid>
      <dc:creator>JamesBurton</dc:creator>
      <dc:date>2021-12-12T03:43:19Z</dc:date>
    </item>
  </channel>
</rss>

