<?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 not fitting itself inside the div in ArcGIS Server with JavaScript API Questions</title>
    <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/map-not-fitting-itself-inside-the-div/m-p/877686#M713</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;More information: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to start the web page with the div hidden.&amp;nbsp; If I start it with the div visible, it seems to work properly.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't really like to start it visible and then shut it down on the page load.&amp;nbsp; It looks odd.&amp;nbsp; And like I said, it seems to be browser specific.&amp;nbsp; The problem is in Chrome and FireFox, but not in IE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Nov 2014 16:45:55 GMT</pubDate>
    <dc:creator>BrentHoskisson</dc:creator>
    <dc:date>2014-11-14T16:45:55Z</dc:date>
    <item>
      <title>Map not fitting itself inside the div</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/map-not-fitting-itself-inside-the-div/m-p/877684#M711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a div block defined as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="xml" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14159809702652463" jivemacro_uid="_14159809702652463"&gt;
&lt;P&gt;&lt;SPAN style="color: #800000; font-size: 10pt; font-family: Consolas;"&gt;&amp;lt;div&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt; font-family: Consolas;"&gt;id&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;="overviewMap"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt; font-family: Consolas;"&gt;style&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;="&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt; font-family: Consolas;"&gt;width&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;290px&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt; font-family: Consolas;"&gt;height&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;205px&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt; font-family: Consolas;"&gt;overflow&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;hidden&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;




&lt;/PRE&gt;&lt;P&gt;The Map is defined as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14159809791059791" jivemacro_uid="_14159809791059791"&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;new Map(&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: 10pt; font-family: Consolas;"&gt;"overviewMap"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;, { extent: initExtent, logo: &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;false&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;, slider: &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;false&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;, smartNavigation: &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;false&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;, fitExtent: &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;true&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; });&lt;/SPAN&gt;&lt;/P&gt;




&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I run the map, only a quarter of the map shows in the div with scrollbars to get to the rest.&amp;nbsp; How can I force the map to draw only inside the div?&amp;nbsp; It seems to be a problem with anything not IE.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only layer in the map is a DynamicMapService layer.&lt;/P&gt;&lt;P&gt;Also I can set the scale, but it just draws the map smaller and still pushes it down and to the right.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Nov 2014 16:04:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/map-not-fitting-itself-inside-the-div/m-p/877684#M711</guid>
      <dc:creator>BrentHoskisson</dc:creator>
      <dc:date>2014-11-14T16:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: Map not fitting itself inside the div</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/map-not-fitting-itself-inside-the-div/m-p/877685#M712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Without the rest of your div and style elements, it's hard to see what's actually going on.&lt;/P&gt;&lt;P&gt;I would create a div and make it the size that you want and then with the mapoverview inside it as such:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14159820509116178" jivemacro_uid="_14159820509116178"&gt;
&lt;P&gt;&amp;lt;div &lt;SPAN class="attribute" style="font-size: 12.222222328186px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: red;"&gt;style&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.222222328186px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="attribute-value" style="font-size: 12.222222328186px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: blue;"&gt;"width:290px; height:205px; overflow:hidden;"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="attribute-value" style="font-size: 12.222222328186px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div &lt;SPAN class="attribute" style="font-size: 12.222222328186px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: red;"&gt;id&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.222222328186px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="attribute-value" style="font-size: 12.222222328186px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: blue;"&gt;"overviewMap"&amp;gt;&amp;lt;/div&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="attribute-value" style="font-size: 12.222222328186px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: blue;"&gt;&lt;SPAN class="attribute-value" style="font-size: 12.222222328186px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: blue;"&gt;&amp;lt;/div&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will create a div with the pixel size and the map will insert at 100% inside that div.&amp;nbsp; The way you have it above should work the same but browsers are inconsistent some times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steven&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Nov 2014 16:23:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/map-not-fitting-itself-inside-the-div/m-p/877685#M712</guid>
      <dc:creator>StevenGraf1</dc:creator>
      <dc:date>2014-11-14T16:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Map not fitting itself inside the div</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/map-not-fitting-itself-inside-the-div/m-p/877686#M713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;More information: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to start the web page with the div hidden.&amp;nbsp; If I start it with the div visible, it seems to work properly.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't really like to start it visible and then shut it down on the page load.&amp;nbsp; It looks odd.&amp;nbsp; And like I said, it seems to be browser specific.&amp;nbsp; The problem is in Chrome and FireFox, but not in IE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Nov 2014 16:45:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/map-not-fitting-itself-inside-the-div/m-p/877686#M713</guid>
      <dc:creator>BrentHoskisson</dc:creator>
      <dc:date>2014-11-14T16:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Map not fitting itself inside the div</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/map-not-fitting-itself-inside-the-div/m-p/877687#M714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So when the page loads you want it hidden.&amp;nbsp; Then a user clicks a button and the map appears in the page?&amp;nbsp; Is this the functionality you need?&amp;nbsp; You can hide a div like &lt;A href="http://stackoverflow.com/questions/10148660/javascript-hide-a-div-at-startup-load"&gt;this.&lt;/A&gt;&amp;nbsp; And then you can use a toggle button to show/hide the div like&lt;A href="http://www.w3schools.com/jquery/jquery_hide_show.asp"&gt; this.&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Nov 2014 20:25:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/map-not-fitting-itself-inside-the-div/m-p/877687#M714</guid>
      <dc:creator>StevenGraf1</dc:creator>
      <dc:date>2014-11-14T20:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Map not fitting itself inside the div</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/map-not-fitting-itself-inside-the-div/m-p/877688#M715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem is not with hiding and showing it.&amp;nbsp; It is that the map can't correctly initialize when it is hidden.&amp;nbsp; Because apparently the JavaScript API get the definition of the map limits from parts of the div that are only available when it is visible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Nov 2014 14:33:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/map-not-fitting-itself-inside-the-div/m-p/877688#M715</guid>
      <dc:creator>BrentHoskisson</dc:creator>
      <dc:date>2014-11-17T14:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: Map not fitting itself inside the div</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/map-not-fitting-itself-inside-the-div/m-p/877689#M716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I decided to solve this by not loading the Overview map until I needed it the first time.&amp;nbsp; Then I would make the div visibile.&amp;nbsp; THEN I ran the code to initialize the map.&amp;nbsp; It seems to work on all platforms that way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Nov 2014 14:58:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/map-not-fitting-itself-inside-the-div/m-p/877689#M716</guid>
      <dc:creator>BrentHoskisson</dc:creator>
      <dc:date>2014-11-17T14:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Map not fitting itself inside the div</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/map-not-fitting-itself-inside-the-div/m-p/877690#M717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe this sample: &lt;A href="http://jsfiddle.net/u34wa1wr/1/" title="http://jsfiddle.net/u34wa1wr/1/"&gt;Edit fiddle - JSFiddle&lt;/A&gt;&amp;nbsp; implements the behavior you desire.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 19:10:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/map-not-fitting-itself-inside-the-div/m-p/877690#M717</guid>
      <dc:creator>NicholasHaney</dc:creator>
      <dc:date>2014-12-17T19:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Map not fitting itself inside the div</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/map-not-fitting-itself-inside-the-div/m-p/877691#M718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it seems the undocumented solution is to make the layer hidden as well and then make it visible when the div becomes visible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 20:58:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/map-not-fitting-itself-inside-the-div/m-p/877691#M718</guid>
      <dc:creator>BrentHoskisson</dc:creator>
      <dc:date>2014-12-17T20:58:09Z</dc:date>
    </item>
  </channel>
</rss>

