<?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 JQuery Mobile layout issue in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/jquery-mobile-layout-issue/m-p/748600#M69261</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've made a mobile centric version of my application using Jquery Mobile as my UI (direct link &lt;/SPAN&gt;&lt;A href="http://gismaps.snoco.org/fws/mobile/" rel="nofollow noopener noreferrer" target="_blank"&gt;here&lt;/A&gt;&lt;SPAN&gt;) and I'm having an annoying issue with the map's Div. The app has three pages and each page does have a header that is fixed in terms of its positioning. The map page has a footer and it also has fixed positioning.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that, at least on my iPhone, the map div's content can scroll underneath the header of the page making the zoom buttons inaccessible. How do I prevent this from happening?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mobile being mobile, I know that I need to adapt to screen sizes and orientations. During the intial page load, I evaluate the user's screen to adjust the map page's header,footer, and content height:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; $(document).ready(function() { 
&amp;nbsp; headerHeight = $('#mapHeader').height();
&amp;nbsp; footerHeight = $('#mapFooter').height() + 5;
&amp;nbsp; 
&amp;nbsp; mapHeight = $(window).height() - headerHeight - footerHeight;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; $('#map').height(mapHeight);
&amp;nbsp; map.resize();&amp;nbsp;&amp;nbsp; 
 });&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have the same basic code to account for orientation changes:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; $( window ).on( "orientationchange", function( event ) {
&amp;nbsp; headerHeight = $('#mapHeader').height();
&amp;nbsp; footerHeight = $('#mapFooter').height() + 5;
&amp;nbsp; 
&amp;nbsp; console.info('Header Height: ' + headerHeight);
&amp;nbsp; console.info('Footer Height: ' + footerHeight);

&amp;nbsp; mapHeight = $(window).height() - headerHeight - footerHeight;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; $('#map').height(mapHeight);
&amp;nbsp; 
&amp;nbsp; if ($.mobile.activePage.attr('id') == "mapPage") {
&amp;nbsp;&amp;nbsp; map.resize();
&amp;nbsp; }
 }); &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also read about touchmove in my web searches so I threw this in my code for good measure:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; $('#mapPage').delegate('.ui-content', 'touchmove', false);
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Didn't seem to make any difference. Anyone have any tips?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 07:49:20 GMT</pubDate>
    <dc:creator>SteveCole</dc:creator>
    <dc:date>2021-12-12T07:49:20Z</dc:date>
    <item>
      <title>JQuery Mobile layout issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/jquery-mobile-layout-issue/m-p/748600#M69261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've made a mobile centric version of my application using Jquery Mobile as my UI (direct link &lt;/SPAN&gt;&lt;A href="http://gismaps.snoco.org/fws/mobile/" rel="nofollow noopener noreferrer" target="_blank"&gt;here&lt;/A&gt;&lt;SPAN&gt;) and I'm having an annoying issue with the map's Div. The app has three pages and each page does have a header that is fixed in terms of its positioning. The map page has a footer and it also has fixed positioning.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that, at least on my iPhone, the map div's content can scroll underneath the header of the page making the zoom buttons inaccessible. How do I prevent this from happening?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mobile being mobile, I know that I need to adapt to screen sizes and orientations. During the intial page load, I evaluate the user's screen to adjust the map page's header,footer, and content height:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; $(document).ready(function() { 
&amp;nbsp; headerHeight = $('#mapHeader').height();
&amp;nbsp; footerHeight = $('#mapFooter').height() + 5;
&amp;nbsp; 
&amp;nbsp; mapHeight = $(window).height() - headerHeight - footerHeight;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; $('#map').height(mapHeight);
&amp;nbsp; map.resize();&amp;nbsp;&amp;nbsp; 
 });&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have the same basic code to account for orientation changes:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; $( window ).on( "orientationchange", function( event ) {
&amp;nbsp; headerHeight = $('#mapHeader').height();
&amp;nbsp; footerHeight = $('#mapFooter').height() + 5;
&amp;nbsp; 
&amp;nbsp; console.info('Header Height: ' + headerHeight);
&amp;nbsp; console.info('Footer Height: ' + footerHeight);

&amp;nbsp; mapHeight = $(window).height() - headerHeight - footerHeight;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; $('#map').height(mapHeight);
&amp;nbsp; 
&amp;nbsp; if ($.mobile.activePage.attr('id') == "mapPage") {
&amp;nbsp;&amp;nbsp; map.resize();
&amp;nbsp; }
 }); &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also read about touchmove in my web searches so I threw this in my code for good measure:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; $('#mapPage').delegate('.ui-content', 'touchmove', false);
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Didn't seem to make any difference. Anyone have any tips?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:49:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/jquery-mobile-layout-issue/m-p/748600#M69261</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2021-12-12T07:49:20Z</dc:date>
    </item>
  </channel>
</rss>

