<?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: Map in StackContainer sized to 400px in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-in-stackcontainer-sized-to-400px/m-p/378640#M35141</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you tried setting the &lt;/SPAN&gt;&lt;STRONG&gt;doLayout&lt;/STRONG&gt;&lt;SPAN&gt; property of the StackContainer to &lt;/SPAN&gt;&lt;STRONG&gt;false&lt;/STRONG&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This sets the size of the container to the size of the selected child pane. All of your panes would need to be 100% x 100%. I have never tried it in a mobile layout. It might not work, but then again it might.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Jun 2013 19:29:43 GMT</pubDate>
    <dc:creator>BenFousek</dc:creator>
    <dc:date>2013-06-18T19:29:43Z</dc:date>
    <item>
      <title>Map in StackContainer sized to 400px</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-in-stackcontainer-sized-to-400px/m-p/378637#M35138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; I am building a mobile app and am running into problems with the size of the map.&amp;nbsp; I have a stack container(with 3 content pane's) inside a border container with region set to center.&amp;nbsp; The first stack loaded is the homepage with 2 options, a map page and a info page, if I click the map page the map always loads with height and width set to 400px.&amp;nbsp; I have every parent of the mapDiv and the map set to 100% width and heigh. If I load the map page by default and not the homepage, it loads at full screen, but I need to load the homepage first and doing so results in the map always getting set to 400px. I have tested lots of different things and have not come up with a clean solution. Does anyone have any suggestions ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;note: I set the class map like this &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;.map {
height: 100% !important;
width: 100% !important
}&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt; and I end up with the map loading at 400 x 400 but then a second later expanding to 100%, kind of works but looks bad and the center point I define in map constructor is center when it is 400 x 400 not 100%&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2013 13:43:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-in-stackcontainer-sized-to-400px/m-p/378637#M35138</guid>
      <dc:creator>RobertWinterbottom</dc:creator>
      <dc:date>2013-06-18T13:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: Map in StackContainer sized to 400px</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-in-stackcontainer-sized-to-400px/m-p/378638#M35139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So I tried some new things.&amp;nbsp; I removed the StackContainer from the equation and made a very simple layout with three div's that change their display property.&amp;nbsp; I changed all three Content Panes in the Stack Container to normal div's with display set to none, I then set the homepage display to block and when a button was hit to change page I would just change the page's display to block and the previous page's display to none.&amp;nbsp; This results in the same thing.&amp;nbsp; When I change to the map it shows up in 400 x 400.&amp;nbsp; Could it be that just because when I create the map, if the parentDiv the map lives in has the display set to none then it defaults to this size?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2013 16:53:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-in-stackcontainer-sized-to-400px/m-p/378638#M35139</guid>
      <dc:creator>RobertWinterbottom</dc:creator>
      <dc:date>2013-06-18T16:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Map in StackContainer sized to 400px</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-in-stackcontainer-sized-to-400px/m-p/378639#M35140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, that's what's happening.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you create the map inside of a non-visible element, or an element that otherwise does not have "layout" (proper dimensions), the map gets an inline style of 400x400 by default.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Likewise, if you call the map's "resize" method in the same type of scenario, you'll run into similar problems*. In fact, the map control would lose all of its internal layer elements in previous versions of the API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The solution here is to ensure that you're creating and/or resizing your map inside of elements that are visible and larger than 2px x 2px. You should wait until the map is to be displayed for the first time and create it then.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;*Newer versions of the API will resize the map control for you when the parent element changes, I think this is what you see when your 400x400 map expands after a short delay. I prefer to manage the calls to resize myself as I know from events precisely when the map control should change size.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2013 19:05:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-in-stackcontainer-sized-to-400px/m-p/378639#M35140</guid>
      <dc:creator>JasonScharf</dc:creator>
      <dc:date>2013-06-18T19:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Map in StackContainer sized to 400px</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-in-stackcontainer-sized-to-400px/m-p/378640#M35141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you tried setting the &lt;/SPAN&gt;&lt;STRONG&gt;doLayout&lt;/STRONG&gt;&lt;SPAN&gt; property of the StackContainer to &lt;/SPAN&gt;&lt;STRONG&gt;false&lt;/STRONG&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This sets the size of the container to the size of the selected child pane. All of your panes would need to be 100% x 100%. I have never tried it in a mobile layout. It might not work, but then again it might.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2013 19:29:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-in-stackcontainer-sized-to-400px/m-p/378640#M35141</guid>
      <dc:creator>BenFousek</dc:creator>
      <dc:date>2013-06-18T19:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: Map in StackContainer sized to 400px</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-in-stackcontainer-sized-to-400px/m-p/378641#M35142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;@ _js&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok that makes sense.&amp;nbsp; I have not switched back to the stack container yet but with the divs I was able to call initMap the first time the map page loads and it is now working as expected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;@ btfou&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I did try that and If I remember I had every pane and parent set to 100% width and height, but I will do some more testing later tonight after work just to be sure, it's currently working with div's and calling my initMap function when that particular div becomes visible, so I'll see if I can get this working inside the stack container widget.&amp;nbsp; This was failing in the browser as I often just test things in Safari to make sure they at least load before I run the app through XCode and then test it on my iPhone or iPad.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks guys, I appreciate the response.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2013 20:03:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-in-stackcontainer-sized-to-400px/m-p/378641#M35142</guid>
      <dc:creator>RobertWinterbottom</dc:creator>
      <dc:date>2013-06-18T20:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: Map in StackContainer sized to 400px</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-in-stackcontainer-sized-to-400px/m-p/378642#M35143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi everyone. I'm working with Sencha Touch 2 framework and I'm having the same issue. I have the map on a panel with fixed layout and it's always rendered in 400x400px. Could you give me some tips for the work around?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jun 2013 04:10:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-in-stackcontainer-sized-to-400px/m-p/378642#M35143</guid>
      <dc:creator>BrunoGonzalez</dc:creator>
      <dc:date>2013-06-21T04:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Map in StackContainer sized to 400px</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-in-stackcontainer-sized-to-400px/m-p/378643#M35144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I did some testing and the following works. The map had to be the first pane to load properly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;html, body { width:100%; height:100%; margin:0; padding:0; }
#stack { z-index:1; width:100%; height:100%; padding:0; background-color:#EFEFEF; }
#map { z-index:1; width:100%; height:100%; padding:0; background-color:#EFEFEF; }
#info { z-index:1; width:100%; height:100%; pading:1em; background-color:#EFEFEF; }
#geo { z-index:1; width:100%; height:100%; pading:1em; background-color:#EFEFEF; }&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[HTML]&amp;lt;div id="stack" data-dojo-type="dijit/layout/StackContainer" data-dojo-props=""&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;div id="map" data-dojo-type="dijit/layout/ContentPane" data-dojo-props=""&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;/div&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;div id="info" data-dojo-type="dijit/layout/ContentPane" data-dojo-props=""&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;/div&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;div id="geo" data-dojo-type="dijit/layout/ContentPane" data-dojo-props=""&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;/div&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/div&amp;gt;[/HTML]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want the map to not be the first pane, e.g. a welcome pane first, you would need to load the map the first time the map pane was selected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
function load() {
 var conn = new dojo.connect(dijit.byId('map'), 'onShow', function() {
&amp;nbsp; dojo.disconnect(conn);
&amp;nbsp; //load map
 });
}
dojo.ready(load);&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:29:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-in-stackcontainer-sized-to-400px/m-p/378643#M35144</guid>
      <dc:creator>BenFousek</dc:creator>
      <dc:date>2021-12-11T17:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: Map in StackContainer sized to 400px</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-in-stackcontainer-sized-to-400px/m-p/378644#M35145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;i fixed that with this code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;require(["dojo/ready","esri/map", "dojo/domReady!"], function (ready,Map) {
&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; ready(function () {
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map = new Map("map", {
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; basemap: "topo",
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; center: [-122.45,37.75], // long, lat
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zoom: 13,
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sliderStyle: "small"
&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;&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;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:29:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-in-stackcontainer-sized-to-400px/m-p/378644#M35145</guid>
      <dc:creator>MihaiAsandulesei</dc:creator>
      <dc:date>2021-12-11T17:29:39Z</dc:date>
    </item>
  </channel>
</rss>

