<?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: mobile_dev.html Tutorial - why doesn't it work to switch the positions of the vie in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mobile-dev-html-tutorial-why-doesn-t-it-work-to/m-p/553588#M51639</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok looks like that sample may already have logic to resize the map. Try setting autoResize to true and see if it resolves the issue. Here's an example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
var map = new esri.Map("map", {
&amp;nbsp; autoResize: false,
 basemap: "topo", 
.......
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 23:55:43 GMT</pubDate>
    <dc:creator>KellyHutchins</dc:creator>
    <dc:date>2021-12-11T23:55:43Z</dc:date>
    <item>
      <title>mobile_dev.html Tutorial - why doesn't it work to switch the positions of the views?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mobile-dev-html-tutorial-why-doesn-t-it-work-to/m-p/553585#M51636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think this is a very common scenario and I've read several threads about this.&amp;nbsp; Instead of opening with a map, you want to show something else instead first, maybe a query, and then show the results on a map next and/or optionally.&amp;nbsp; There seems to be all sorts of issues dealing with a map 'after the fact', Once your map isn't part of your initial display, there's all sorts of extra steps you have to take to deal with this.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example:&amp;nbsp; In the mobile_dev.html tutorial, there are two views, one Map and one for About.&amp;nbsp; It initializes with a map first.&amp;nbsp; But what if I want to have the About on top?&amp;nbsp; All I did was switch the positions, and change the about to have the 'selected:true' defined.&amp;nbsp; I'm not sure I even needed to physically change the order in the code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp; &amp;lt;body&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="aboutView" data-dojo-type="dojox.mobile.View" data-dojo-props="selected: true"&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;h1 data-dojo-type="dojox.mobile.Heading" data-dojo-props="back:'Map', moveTo:'mapView'"&amp;gt;About&amp;lt;/h1&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;p style="padding: 5px;"&amp;gt;This area can contain additional information about your application.&amp;lt;/p&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;p&amp;gt;Ex quorum ab quorum non senserit magna se litteris firmissimum. Pariatur fore&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elit do dolor, eram vidisse id proident, nam anim ea multos, ab multos offendit.&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Labore coniunctione senserit legam commodo. Aut in voluptatibus, ab singulis&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; consectetur iis e culpa enim ad quamquam ubi ita amet quibusdam. Quis iudicem e&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nostrud, in veniam varias nisi admodum, eiusmod esse quamquam arbitror sed dolor&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; eruditionem commodo eram consequat. Esse cupidatat te culpa nisi. Vidisse lorem&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; minim ab nulla. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/p&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="mapView" data-dojo-type="dojox.mobile.View" &amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="header" data-dojo-type="dojox.mobile.Heading"&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="aboutButton" data-dojo-type="dojox.mobile.ToolBarButton" style="float: right;" moveTo="aboutView"&amp;gt;About&amp;lt;/div&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="mapContainer" data-dojo-type="dojox.mobile.ContentPane"&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="map"&amp;gt;&amp;lt;/div&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt; &amp;nbsp; &amp;lt;/body&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When you do this, when you switch to the map, first it is cropped to a narrow column and then it disappears completely.&amp;nbsp; I don't understand why.&amp;nbsp; In this particular example there seems to be all sorts of extra functions for map resizing etc and you'd think somewhere in there the map would be properly displayed.&amp;nbsp; I see this same behavior in both Firefox and Chrome.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2014 20:02:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mobile-dev-html-tutorial-why-doesn-t-it-work-to/m-p/553585#M51636</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2014-03-27T20:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: mobile_dev.html Tutorial - why doesn't it work to switch the positions of the vie</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mobile-dev-html-tutorial-why-doesn-t-it-work-to/m-p/553586#M51637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There is a known problem in the API where we can't automatically resize maps that are hidden. The workaround for this, until the issue is resolved, is to set autoResize to false when creating the map. This means you will have to handle the map resize yourself.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2014 20:42:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mobile-dev-html-tutorial-why-doesn-t-it-work-to/m-p/553586#M51637</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2014-03-27T20:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: mobile_dev.html Tutorial - why doesn't it work to switch the positions of the vie</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mobile-dev-html-tutorial-why-doesn-t-it-work-to/m-p/553587#M51638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I guess I don't know what "you have to handle the resize yourself" really means.&amp;nbsp; In one thread I saw that adding the autoResize:false parameters to the map definition was suggested.&amp;nbsp; So I did.&amp;nbsp;&amp;nbsp;&amp;nbsp; But in this example there seems to be code to handle the resize, without having to do anything more.&amp;nbsp; Isn't what these functions are for?&lt;/SPAN&gt;&lt;BR /&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; function mapLoadHandler(evt) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; resizeMap();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; registry.byId('mapView').on('AfterTransitionIn', resizeMap);
&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; function resizeMap() {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mobile.hideAddressBar();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; adjustMapHeight();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.resize();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.reposition();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What else is there to it?&amp;nbsp; This looks to me that it should fire the resizeMap function every time it transitions to the mapView, which contains map.resize and map.reposition.&amp;nbsp; But it doesn't display right.&amp;nbsp; Plus it often generates errors on some of the tiles in the streets base map, which I also think is weird.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:55:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mobile-dev-html-tutorial-why-doesn-t-it-work-to/m-p/553587#M51638</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2021-12-11T23:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: mobile_dev.html Tutorial - why doesn't it work to switch the positions of the vie</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mobile-dev-html-tutorial-why-doesn-t-it-work-to/m-p/553588#M51639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok looks like that sample may already have logic to resize the map. Try setting autoResize to true and see if it resolves the issue. Here's an example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
var map = new esri.Map("map", {
&amp;nbsp; autoResize: false,
 basemap: "topo", 
.......
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:55:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mobile-dev-html-tutorial-why-doesn-t-it-work-to/m-p/553588#M51639</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2021-12-11T23:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: mobile_dev.html Tutorial - why doesn't it work to switch the positions of the vie</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mobile-dev-html-tutorial-why-doesn-t-it-work-to/m-p/553589#M51640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've tried it both ways, autoResize:true and autoResize:false.&amp;nbsp; Neither yields a map that draws correctly.&amp;nbsp; The 2nd time I toggled the view, from About to Map, using autoResize:true, the map didn't display anything at all.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm hoping someone on your end can eventually address this issue in the API itself, so we don't all have to do these workarounds.&amp;nbsp; At first I thought the issue was the fact that I chose to use dojo rather than something like jQuery.&amp;nbsp; But the threads in these forums related to this issue mention several different JS libraries.&amp;nbsp; As I read them, it doesn't seem to matter which of those you choose, the problem is in the ESRI JS library we're all trying to use.&amp;nbsp; Very frustrating.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2014 12:23:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mobile-dev-html-tutorial-why-doesn-t-it-work-to/m-p/553589#M51640</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2014-03-28T12:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: mobile_dev.html Tutorial - why doesn't it work to switch the positions of the vie</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mobile-dev-html-tutorial-why-doesn-t-it-work-to/m-p/553590#M51641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Apparently it did not like the resizeMap getting called in the map onload event since it's not part of the initial view.&amp;nbsp; I commented out the call to it and it works now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function mapLoadHandler(evt) { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp; resizeMap(); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; registry.byId('mapView').on('AfterTransitionIn', resizeMap); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2014 12:47:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mobile-dev-html-tutorial-why-doesn-t-it-work-to/m-p/553590#M51641</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2014-03-28T12:47:23Z</dc:date>
    </item>
  </channel>
</rss>

