<?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 Map variable placement..always required at the end of cell? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/map-variable-placement-always-required-at-the-end/m-p/803224#M2145</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Trying to use the ArcGIS API for Python in Juypter Notebooks. It seems the map variable is required to be at the bottom of the cell. For example, this doesn't work for me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/448478_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if I remove the if statement and put map2 at the bottom (as in most examples) it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there anyway around that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 May 2019 23:58:39 GMT</pubDate>
    <dc:creator>BradCooper</dc:creator>
    <dc:date>2019-05-24T23:58:39Z</dc:date>
    <item>
      <title>Map variable placement..always required at the end of cell?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/map-variable-placement-always-required-at-the-end/m-p/803224#M2145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Trying to use the ArcGIS API for Python in Juypter Notebooks. It seems the map variable is required to be at the bottom of the cell. For example, this doesn't work for me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/448478_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if I remove the if statement and put map2 at the bottom (as in most examples) it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there anyway around that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2019 23:58:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/map-variable-placement-always-required-at-the-end/m-p/803224#M2145</guid>
      <dc:creator>BradCooper</dc:creator>
      <dc:date>2019-05-24T23:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: Map variable placement..always required at the end of cell?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/map-variable-placement-always-required-at-the-end/m-p/803225#M2146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;A href="https://community.esri.com/migrated-users/46883"&gt;Brad Cooper&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is default behavior in Jupyter, if there is an object&amp;nbsp;at the end of a cell it is evaluated and sent to the output area, put it anywhere else and it's ignored.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" height="177" src="https://community.esri.com/legacyfs/online/449642_pastedImage_1.png" width="499" /&gt;&lt;/P&gt;&lt;P&gt;There are several ways around this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your case the easiest solution is probably a simple restructure of the code:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" height="341" src="https://community.esri.com/legacyfs/online/449643_pastedImage_2.png" width="509" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or you can wrap your code in a function:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" height="322" src="https://community.esri.com/legacyfs/online/449644_pastedImage_3.png" width="509" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2019 19:13:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/map-variable-placement-always-required-at-the-end/m-p/803225#M2146</guid>
      <dc:creator>HåkonDreyer</dc:creator>
      <dc:date>2019-06-04T19:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: Map variable placement..always required at the end of cell?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/map-variable-placement-always-required-at-the-end/m-p/803226#M2147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I ended up doing a little different and forgot to post. Our solution was to use display&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;display(_map)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/449645_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2019 19:24:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/map-variable-placement-always-required-at-the-end/m-p/803226#M2147</guid>
      <dc:creator>BradCooper</dc:creator>
      <dc:date>2019-06-04T19:24:57Z</dc:date>
    </item>
  </channel>
</rss>

