<?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: Resize Popup Window in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/resize-popup-window/m-p/654190#M60949</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yeah, the pointToExtent function isn't an ESRI API function. FWIW, here it is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;function pointToExtent(map, point, toleranceInPixel) {
 //Function to convert a point coordinate into a rectangle area
 var pixelWidth = map.extent.getWidth() / map.width;
 var toleraceInMapCoords = toleranceInPixel * pixelWidth;
&amp;nbsp;&amp;nbsp;&amp;nbsp; toleraceInMapCoords = 1320;
 return new esri.geometry.Extent( point.x - toleraceInMapCoords,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point.y - toleraceInMapCoords,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point.x + toleraceInMapCoords,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point.y + toleraceInMapCoords,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.spatialReference
 );
}&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You didn't post any code so I was assuming that you're using featureLayers for your layers. If you use featureLayers, you have to add the dojo.require for it:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;dojo.require("esri.layers.FeatureLayer");&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 03:43:14 GMT</pubDate>
    <dc:creator>SteveCole</dc:creator>
    <dc:date>2021-12-12T03:43:14Z</dc:date>
    <item>
      <title>Resize Popup Window</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/resize-popup-window/m-p/654187#M60946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I created a map where almost all the popup windows are 480x400. I do have a few windows that only need to be 200x100. I added:&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;map.infoWindow.resize(480, 400);&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;to the map to make the popup windows 480x400. If I add:&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;map.infoWindow.resize(200, 100);&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;to the map as well, all my popup windows are 200x100. It seems like whatever code I add to modify the infoWindow last is what all the windows are size to. Is there a way to have popup windows different sizes on the same map?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 May 2013 17:24:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/resize-popup-window/m-p/654187#M60946</guid>
      <dc:creator>RayJulich</dc:creator>
      <dc:date>2013-05-08T17:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: Resize Popup Window</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/resize-popup-window/m-p/654188#M60947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Where are you placing your map.infoWindow.resize code? Is it within a dojo.connect for each layer? I'm doing this with version 3.3 of the API without any problems:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; //Listener event for feature selection and the popup info widow 
 dojo.connect(theUsgsLayer,"onClick",function(evt){
&amp;nbsp; //Listener event for feature selection and the popup info widow
&amp;nbsp; var query = new esri.tasks.Query();
&amp;nbsp; query.geometry = pointToExtent(map,evt.mapPoint,15);

&amp;nbsp; var deferred = theUsgsLayer.selectFeatures(query,esri.layers.FeatureLayer.SELECTION_NEW);
&amp;nbsp; map.infoWindow.resize(350,300);&amp;nbsp; 
&amp;nbsp; map.infoWindow.setFeatures([deferred]);
&amp;nbsp; map.infoWindow.show(evt.mapPoint);
 });

 //Listener event for feature selection and the popup info widow 
 dojo.connect(theFloodplainLayer,"onClick",function(evt){
&amp;nbsp; //Listener event for feature selection and the popup info widow
&amp;nbsp; var query = new esri.tasks.Query();
&amp;nbsp; query.geometry = pointToExtent(map,evt.mapPoint,15);

&amp;nbsp; var deferred = theFloodplainLayer.selectFeatures(query,esri.layers.FeatureLayer.SELECTION_NEW); 
&amp;nbsp; //map.infoWindow.resize(map.width * 0.70, map.height * 0.6);
&amp;nbsp; map.infoWindow.resize(200,175);
&amp;nbsp; map.infoWindow.setFeatures([evt.graphic]);
&amp;nbsp; map.infoWindow.show(evt.mapPoint);
 });
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:43:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/resize-popup-window/m-p/654188#M60947</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2021-12-12T03:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Resize Popup Window</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/resize-popup-window/m-p/654189#M60948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;evtguy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I had the resize statement right before I added the point to the map. All the points were in the same layer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;map.infoWindow.resize(480, 400);&lt;BR /&gt;glayer.add(graphic);&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess all popup windows on the same layer need to be the same size. I tried using the code you had posted, but it seems to be missing some code. Here are the errors the 2 errors I get when using the code (using Firefox Firebug):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-No pointToExtent function&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-esri.layers.FeatureLayer in undefined&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I did create another layer for the points that needed a smaller popup window.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 May 2013 20:02:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/resize-popup-window/m-p/654189#M60948</guid>
      <dc:creator>RayJulich</dc:creator>
      <dc:date>2013-05-08T20:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: Resize Popup Window</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/resize-popup-window/m-p/654190#M60949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yeah, the pointToExtent function isn't an ESRI API function. FWIW, here it is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;function pointToExtent(map, point, toleranceInPixel) {
 //Function to convert a point coordinate into a rectangle area
 var pixelWidth = map.extent.getWidth() / map.width;
 var toleraceInMapCoords = toleranceInPixel * pixelWidth;
&amp;nbsp;&amp;nbsp;&amp;nbsp; toleraceInMapCoords = 1320;
 return new esri.geometry.Extent( point.x - toleraceInMapCoords,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point.y - toleraceInMapCoords,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point.x + toleraceInMapCoords,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point.y + toleraceInMapCoords,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.spatialReference
 );
}&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You didn't post any code so I was assuming that you're using featureLayers for your layers. If you use featureLayers, you have to add the dojo.require for it:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;dojo.require("esri.layers.FeatureLayer");&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:43:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/resize-popup-window/m-p/654190#M60949</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2021-12-12T03:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: Resize Popup Window</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/resize-popup-window/m-p/654191#M60950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;entguy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using a GraphicsLayer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var layerObj = new esri.layers.GraphicsLayer({id:"points_glayer", visible:true, opacity:1});
map.addLayer(layerObj);

var glayer = map.getLayer("points_glayer");&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I do this with featureLayer? Sorry, I'm fairly new to ESRI Javascript.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:43:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/resize-popup-window/m-p/654191#M60950</guid>
      <dc:creator>RayJulich</dc:creator>
      <dc:date>2021-12-12T03:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: Resize Popup Window</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/resize-popup-window/m-p/654192#M60951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ahh, ok, the line in my code about selectFeatures is for featureLayers so that obviously won't work with graphicsLayers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What criteria defines when you need to use your smaller sized windows? Do the features in your graphicsLayer have an attribute which should trigger the use of a smaller window or do you have multiple graphicsLayers and only some of &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;those&lt;/SPAN&gt;&lt;SPAN&gt; need the smaller windows?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I haven't done any work with graphicsLayers so I'm going to have to defer to someone else about that. You should still be able to utilize a dojo.connect on your layer's onClick event but I'm a little fuzzy on the details from there. I know this isn't always possible but, if you have a link to a publicly accessible version of the project you're working on. posting it here would help others try and troubleshoot your issue and better understand how your layers are set up.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 May 2013 21:51:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/resize-popup-window/m-p/654192#M60951</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2013-05-08T21:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: Resize Popup Window</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/resize-popup-window/m-p/654193#M60952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Steve,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the map that I have most recently made - &lt;/SPAN&gt;&lt;A href="http://wa.water.usgs.gov/projects/clovercreek/hydrographs.esri.htm"&gt;http://wa.water.usgs.gov/projects/clovercreek/hydrographs.esri.htm&lt;/A&gt;&lt;SPAN&gt;. There is actually only one popup window one this map that needs a smaller popup window. The point is the second one from the very right, on the top. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]24159[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the text file that is read in for placing all the points on the map, there is a field called &lt;/SPAN&gt;&lt;STRONG&gt;type&lt;/STRONG&gt;&lt;SPAN&gt;, if the type = m, then the point needs to have a smaller popup window, otherwise, the point will have a larger popup window with a graph in the window.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]24160[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is no particular reason for me using a GraphicLayer. If I can do what I need with a FeatureLayer - I'm open to that. When I first crated the map, I had all of the points on the same layer. Then, I put the point that needs the smaller window on it's own layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ray&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 13:47:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/resize-popup-window/m-p/654193#M60952</guid>
      <dc:creator>RayJulich</dc:creator>
      <dc:date>2013-05-09T13:47:07Z</dc:date>
    </item>
  </channel>
</rss>

