<?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: programmatically resize bootstrap-map in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/programmatically-resize-bootstrap-map/m-p/32485#M2618</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, yes and no.&amp;nbsp; I found a workaround, but I decided I really didn't like the behavior I was getting.&amp;nbsp; When the sidebar resized triggered a map resize, it almost looked like the map was jumping around, especially if the amount it needed to resize wasn't much.&amp;nbsp; I called this when I populated the grids that were making the sidebar expand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; function resizeMap() {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var mapCon = dom.byId('map-row');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (app.sidebar.offsetHeight &amp;amp;&amp;amp; app.map) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; domStyle.set(dom.byId('map'), 'height', app.sidebar.offsetHeight + 'px');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app.map.resize();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;The other thing I didn't like was the map center was also repositioned, because the overall map div was larger.&amp;nbsp; Sometimes it adjusted enough the area you were looking at 1/2 disappeared, forcing you to scroll on your map back to the area you'd been looking at.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Aug 2015 18:09:30 GMT</pubDate>
    <dc:creator>TracySchloss</dc:creator>
    <dc:date>2015-08-14T18:09:30Z</dc:date>
    <item>
      <title>programmatically resize bootstrap-map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/programmatically-resize-bootstrap-map/m-p/32479#M2612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using a bootstrap map and bootstrap styling in my project.&amp;nbsp; It seems to handle a browser resize much better than a typical esri/Map .&amp;nbsp; I have several tools in my sidebar, most that contain grids.&amp;nbsp; Once the grids are populated, the divs expand to accommodate my data.&amp;nbsp; Since they are now longer, the user must scroll to see all content.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once the user has scrolled down the sidebar, they are noticing that the map looks cut off.&amp;nbsp; The act of expanding the side panel divs isn't something that triggers the map to resize. I added map.resize() in the function that populates the grids, but that doesn't do it.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; If you resize the browser at any point, it does fill it, but I would like to do this programatically, at the point my grids are populated.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This project is getting too complex to post in the thread or jsFiddle, but here's a link:&lt;/P&gt;&lt;P&gt;&lt;A href="https://ogitest.oa.mo.gov/DSS/medProvider2/index_gridOption.html" title="https://ogitest.oa.mo.gov/DSS/medProvider2/index_gridOption.html"&gt;Medicaid Provider Search&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2015 16:50:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/programmatically-resize-bootstrap-map/m-p/32479#M2612</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2015-07-30T16:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: programmatically resize bootstrap-map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/programmatically-resize-bootstrap-map/m-p/32480#M2613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tracy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like you're trying to fire the resize in queryHandler_populateProviders(), right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2015 21:36:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/programmatically-resize-bootstrap-map/m-p/32480#M2613</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2015-07-30T21:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: programmatically resize bootstrap-map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/programmatically-resize-bootstrap-map/m-p/32481#M2614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes.&amp;nbsp; I don't much care where it sits, but once the users makes a few choices and the provider list gets populated, that's when they're likely to start scrolling.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could shorten all the div tags up, but there's a lot of information, and it would mean they were scrolling that much more!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2015 21:38:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/programmatically-resize-bootstrap-map/m-p/32481#M2614</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2015-07-30T21:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: programmatically resize bootstrap-map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/programmatically-resize-bootstrap-map/m-p/32482#M2615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not familiar with the Bootstrap map project, but am looking more into it for my own purposes. This is probably a shot in the dark, but looking at the bootstrapmap.js, I see there is an events option in the constructor:&lt;/P&gt;&lt;P&gt;&lt;/P&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _smartResizer: declare(null, {
&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; constructor: function (mapDivId, options) {
&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; this._map = null;
&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; this._autoRecenterDelay =&amp;nbsp; 50;
&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; this._popupRecenterDelayer = 150;
&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; this._popupPosition = "top";
&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; this._popupBlocked = false;
&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; this._visible = true;
&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; this._visibilityTimer = null;
&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; this._mapDeferred = null;
&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; // Default bootstrap map options
&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; this._autoRecenter = options.autoRecenter || true;
&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; this._responsiveResize = options.responsiveResize || true;
&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 properties
&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; this._mapDivId = mapDivId;
&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; this._mapDiv = dom.byId(mapDivId);
&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; this._mapStyle = style.get(this._mapDiv);
&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 options
&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; this._options = lang.mixin(options, {});
&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; // Events
&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;STRONG&gt;this._handles = [];&lt;/STRONG&gt;
&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;P&gt;&lt;/P&gt;&lt;P&gt;I wonder if you could enhance bootstrapmap.js to accept some options from your bootstrap map initialization in your main module. In the bootstrap module, I see it's pushing events to initiate the resize, it looks like it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;this._handles.push(on(window, "resize", lang.hitch(this, resizeWin)));&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could probably send an event from your main module to call this when the Provider Locations div resizes. I'm not sure... I could be way off base!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:17:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/programmatically-resize-bootstrap-map/m-p/32482#M2615</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2021-12-10T21:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: programmatically resize bootstrap-map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/programmatically-resize-bootstrap-map/m-p/32483#M2616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think you're way off base. I was thinking as well that since the boot-strap map was already set up to resize on window resize that I could take advantage of that somehow.&amp;nbsp; It's one of the reasons I started looking at it in the first place.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I'm not a programmer, more I know enough to be dangerous, but I'll try this and see if it helps.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jul 2015 13:15:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/programmatically-resize-bootstrap-map/m-p/32483#M2616</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2015-07-31T13:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: programmatically resize bootstrap-map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/programmatically-resize-bootstrap-map/m-p/32484#M2617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tracy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did this ever work out for you?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2015 17:46:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/programmatically-resize-bootstrap-map/m-p/32484#M2617</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2015-08-14T17:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: programmatically resize bootstrap-map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/programmatically-resize-bootstrap-map/m-p/32485#M2618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, yes and no.&amp;nbsp; I found a workaround, but I decided I really didn't like the behavior I was getting.&amp;nbsp; When the sidebar resized triggered a map resize, it almost looked like the map was jumping around, especially if the amount it needed to resize wasn't much.&amp;nbsp; I called this when I populated the grids that were making the sidebar expand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; function resizeMap() {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var mapCon = dom.byId('map-row');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (app.sidebar.offsetHeight &amp;amp;&amp;amp; app.map) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; domStyle.set(dom.byId('map'), 'height', app.sidebar.offsetHeight + 'px');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app.map.resize();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;The other thing I didn't like was the map center was also repositioned, because the overall map div was larger.&amp;nbsp; Sometimes it adjusted enough the area you were looking at 1/2 disappeared, forcing you to scroll on your map back to the area you'd been looking at.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2015 18:09:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/programmatically-resize-bootstrap-map/m-p/32485#M2618</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2015-08-14T18:09:30Z</dc:date>
    </item>
  </channel>
</rss>

