<?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: How to identify Basemap layers in the ToC in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-identify-basemap-layers-in-the-toc/m-p/137086#M10741</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like this is the only basemap that does not contain 'arcgisonline'.&amp;nbsp; You could update the code to include 'openstreetmap'.&amp;nbsp; Ex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if "openstreetmap" or "arcgisonline" in layer.description:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'true'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Jul 2014 12:42:27 GMT</pubDate>
    <dc:creator>JakeSkinner</dc:creator>
    <dc:date>2014-07-29T12:42:27Z</dc:date>
    <item>
      <title>How to identify Basemap layers in the ToC</title>
      <link>https://community.esri.com/t5/python-questions/how-to-identify-basemap-layers-in-the-toc/m-p/137083#M10738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any way to identify a basemap layer in the ToC using python?&lt;/P&gt;&lt;P&gt;ArcGIS 10.1 - Python 2.7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2014 15:02:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-identify-basemap-layers-in-the-toc/m-p/137083#M10738</guid>
      <dc:creator>AlbertoLaurenti</dc:creator>
      <dc:date>2014-07-28T15:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify Basemap layers in the ToC</title>
      <link>https://community.esri.com/t5/python-questions/how-to-identify-basemap-layers-in-the-toc/m-p/137084#M10739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alberto,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you try to identify if an ESRI basemap is a layer within the TOC?&amp;nbsp; One way to do this is to query the &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//00s300000008000000http://"&gt;layer&lt;/A&gt; description.&amp;nbsp; All of ESRI's basemap will have 'arcgisonline' at some point in the description.&amp;nbsp; Ex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14065710560791904 jive_text_macro" jivemacro_uid="_14065710560791904"&gt;
&lt;P&gt;if "arcgisonline" in layer.description:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'true'&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2014 18:11:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-identify-basemap-layers-in-the-toc/m-p/137084#M10739</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2014-07-28T18:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify Basemap layers in the ToC</title>
      <link>https://community.esri.com/t5/python-questions/how-to-identify-basemap-layers-in-the-toc/m-p/137085#M10740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Jake.&lt;/P&gt;&lt;P&gt;Yes, I'm looking a way to check if a basemap layer exists in the TOC. Unfortunately what you have suggested does not work: in my MXD I loaded an OpenStreetMap basemap layer and there is no "arcgisonline" word in its description.&lt;/P&gt;&lt;P&gt;Any other idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 08:20:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-identify-basemap-layers-in-the-toc/m-p/137085#M10740</guid>
      <dc:creator>AlbertoLaurenti</dc:creator>
      <dc:date>2014-07-29T08:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify Basemap layers in the ToC</title>
      <link>https://community.esri.com/t5/python-questions/how-to-identify-basemap-layers-in-the-toc/m-p/137086#M10741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like this is the only basemap that does not contain 'arcgisonline'.&amp;nbsp; You could update the code to include 'openstreetmap'.&amp;nbsp; Ex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if "openstreetmap" or "arcgisonline" in layer.description:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'true'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 12:42:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-identify-basemap-layers-in-the-toc/m-p/137086#M10741</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2014-07-29T12:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify Basemap layers in the ToC</title>
      <link>https://community.esri.com/t5/python-questions/how-to-identify-basemap-layers-in-the-toc/m-p/137087#M10742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes Jake,&lt;/P&gt;&lt;P&gt;in that way I can identify basemap layer... but only if default description is not modified! Furthermore I still can't identify custom basemaps.&lt;/P&gt;&lt;P&gt;Anyway, thanks again to have (partially) solved the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 14:25:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-identify-basemap-layers-in-the-toc/m-p/137087#M10742</guid>
      <dc:creator>AlbertoLaurenti</dc:creator>
      <dc:date>2014-07-29T14:25:57Z</dc:date>
    </item>
  </channel>
</rss>

