<?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: Add basemap by arcpy (python) in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/add-basemap-by-arcpy-python/m-p/105835#M8152</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you add one of those basemaps to your ArcMap session, you can right click on the "Basemap" group layer on your Table of Contents and save a .lyr file to your system somewhere.&amp;nbsp; (Use the "Save As Layer File..." button) Then you could run something like this in your script to add it to your map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;basemapLayer = arcpy.mapping.Layer(path_to_your_basemap_lyr_file)

mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd, "*")[0]

arcpy.mapping.AddLayer(df, basemapLayer, "BOTTOM")&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Of course, the downside to this method is you'd need a copy of the .lyr file for that basemap somewhere on your system.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Matt&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 06:27:02 GMT</pubDate>
    <dc:creator>MattEiben</dc:creator>
    <dc:date>2021-12-11T06:27:02Z</dc:date>
    <item>
      <title>Add basemap by arcpy (python)</title>
      <link>https://community.esri.com/t5/python-questions/add-basemap-by-arcpy-python/m-p/105834#M8151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi All&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am wondering how to add Base Map by arcpy.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It is such a simple operation if you use ArcGIS Desktop GUI&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I am wondering how to do the same in arcpy code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]33091[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2014 21:12:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-basemap-by-arcpy-python/m-p/105834#M8151</guid>
      <dc:creator>TakeoShibata</dc:creator>
      <dc:date>2014-04-14T21:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: Add basemap by arcpy (python)</title>
      <link>https://community.esri.com/t5/python-questions/add-basemap-by-arcpy-python/m-p/105835#M8152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you add one of those basemaps to your ArcMap session, you can right click on the "Basemap" group layer on your Table of Contents and save a .lyr file to your system somewhere.&amp;nbsp; (Use the "Save As Layer File..." button) Then you could run something like this in your script to add it to your map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;basemapLayer = arcpy.mapping.Layer(path_to_your_basemap_lyr_file)

mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd, "*")[0]

arcpy.mapping.AddLayer(df, basemapLayer, "BOTTOM")&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Of course, the downside to this method is you'd need a copy of the .lyr file for that basemap somewhere on your system.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Matt&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:27:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-basemap-by-arcpy-python/m-p/105835#M8152</guid>
      <dc:creator>MattEiben</dc:creator>
      <dc:date>2021-12-11T06:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: Add basemap by arcpy (python)</title>
      <link>https://community.esri.com/t5/python-questions/add-basemap-by-arcpy-python/m-p/105836#M8153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for put this process in a script form, it is very useful!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Pedro Bravini&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 May 2018 23:51:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-basemap-by-arcpy-python/m-p/105836#M8153</guid>
      <dc:creator>PedroHenrique_de_Aquino_Bravin</dc:creator>
      <dc:date>2018-05-13T23:51:10Z</dc:date>
    </item>
  </channel>
</rss>

