<?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: WMS from ArcGIS Online not showing in Python API script in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/wms-from-arcgis-online-not-showing-in-python-api/m-p/585667#M45983</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While I was not exactly able to solve the mystery of why the layer doesn't show up when I used something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;gis = GIS("&amp;lt;arcGIS Online URL&amp;gt;", "&amp;lt;user name&amp;gt;", "&amp;lt;pass&amp;gt;")&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;myLyrs = gis.content.search(query="")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was able to find a work around. I basically had to call the specific layer:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; cslfLayer =&amp;nbsp;&lt;SPAN&gt;gis.content.search(query="title: Prelim_CSLF"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and then add it to the myLyrs list. Note: Because cslfLayers also gets returned as a list, I can to use a For loop to pull it out:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;for item in cslfLayer:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myLyrs.append(item)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; cslfLyr = myLyrs[10]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could then view and work with the layer although I am still not sure why the content.search for MyLyrs didn't work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Aug 2018 13:47:58 GMT</pubDate>
    <dc:creator>JustinBridwell2</dc:creator>
    <dc:date>2018-08-20T13:47:58Z</dc:date>
    <item>
      <title>WMS from ArcGIS Online not showing in Python API script</title>
      <link>https://community.esri.com/t5/python-questions/wms-from-arcgis-online-not-showing-in-python-api/m-p/585666#M45982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;I have a Web Map Layer (Prelim_CSLF) in my ArcGIS Online content that is not showing when I call it from the ArcGIS API in a Python script. The Layer comes from a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://hazards.fema.gov/gis/nfhl/rest/services/CSLF/Prelim_CSLF/MapServer" rel="nofollow noreferrer" style="color: #358daa; border: 0px; font-weight: inherit; text-decoration: none;"&gt;public web mapping service&lt;/A&gt;. As you can see, there are other layers in my contents. The ACS Feature Layer also comes from an outside service.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://i.stack.imgur.com/f0jUW.png" rel="nofollow noreferrer" style="color: #358daa; border: 0px; font-weight: inherit; text-decoration: none;"&gt;&lt;IMG alt="enter image description here" src="https://i.stack.imgur.com/f0jUW.png" style="border: 0px; font-weight: inherit;" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;In my script, I use the API to connect to my ArcGIS Online content and just want to list the items there.&lt;/P&gt;&lt;PRE style="color: #242729; background-color: #eff0f1; border: 0px; margin: 0px 0px 1em; padding: 5px;"&gt;&lt;CODE style="background-color: #eff0f1; border: 0px; font-weight: inherit;"&gt;agol = GIS("http://&amp;lt;arcGIS Online url&amp;gt;", "&amp;lt;username&amp;gt;", "&amp;lt;password&amp;gt;") agolList = agol.content.search("") agolList&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;Results =&lt;/P&gt;&lt;PRE style="color: #242729; background-color: #eff0f1; border: 0px; margin: 0px 0px 1em; padding: 5px;"&gt;&lt;CODE style="background-color: #eff0f1; border: 0px; font-weight: inherit;"&gt;[&amp;lt;Item title:"void_poly2" type:Feature Layer Collection owner:&amp;gt;,&amp;nbsp;&amp;nbsp; &amp;lt;Item title:"PANYNJ_Charrette_Data"&amp;nbsp; type:Feature Layer Collection owner:&amp;gt;,&amp;nbsp;&amp;nbsp; &amp;lt;Item title:"Map_Tour_Fianl" type:Feature Layer Collection owner:&amp;gt;,&amp;nbsp;&amp;nbsp; &amp;lt;Item title:"April3_2018_update" type:Feature Layer Collection owner:&amp;gt;,&amp;nbsp;&amp;nbsp; &amp;lt;Item title:"VA_Port" type:Feature Layer Collection owner:&amp;gt;,&amp;nbsp;&amp;nbsp; &amp;lt;Item title:"GTS_Lidar_Project_Boundaries" type:Feature Layer Collection owner:&amp;gt;,&amp;nbsp;&amp;nbsp; &amp;lt;Item title:"PR_SDE_QC_Batch4" type:Feature Layer Collection owner:&amp;gt;,&amp;nbsp;&amp;nbsp; *&amp;lt;Item title:"ACS" type:Feature Layer Collection owner:jbridwell&amp;gt;*,&amp;nbsp;&amp;nbsp; &amp;lt;Item title:"East_Donegal_Water_Utility_Network" type:Feature Layer Collection owner:&amp;gt;,&amp;nbsp;&amp;nbsp; &amp;lt;Item title:"coastal_dg_polygons" type:Feature Layer Collection owner:&amp;gt;]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;However, I am not seeing the Prelim_CSLF layer. I do see the ACS layer though (starred *). When I try&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE style="background-color: #eff0f1; border: 0px; font-weight: inherit; padding: 1px 5px;"&gt;agol.content.search("Prelim_CSLF", item_type="Map Image Layer")&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;it just returns an empty&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE style="background-color: #eff0f1; border: 0px; font-weight: inherit; padding: 1px 5px;"&gt;[]&lt;/CODE&gt;. What is the problem here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2018 13:44:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/wms-from-arcgis-online-not-showing-in-python-api/m-p/585666#M45982</guid>
      <dc:creator>JustinBridwell2</dc:creator>
      <dc:date>2018-08-16T13:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: WMS from ArcGIS Online not showing in Python API script</title>
      <link>https://community.esri.com/t5/python-questions/wms-from-arcgis-online-not-showing-in-python-api/m-p/585667#M45983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While I was not exactly able to solve the mystery of why the layer doesn't show up when I used something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;gis = GIS("&amp;lt;arcGIS Online URL&amp;gt;", "&amp;lt;user name&amp;gt;", "&amp;lt;pass&amp;gt;")&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;myLyrs = gis.content.search(query="")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was able to find a work around. I basically had to call the specific layer:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; cslfLayer =&amp;nbsp;&lt;SPAN&gt;gis.content.search(query="title: Prelim_CSLF"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and then add it to the myLyrs list. Note: Because cslfLayers also gets returned as a list, I can to use a For loop to pull it out:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;for item in cslfLayer:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myLyrs.append(item)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; cslfLyr = myLyrs[10]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could then view and work with the layer although I am still not sure why the content.search for MyLyrs didn't work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2018 13:47:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/wms-from-arcgis-online-not-showing-in-python-api/m-p/585667#M45983</guid>
      <dc:creator>JustinBridwell2</dc:creator>
      <dc:date>2018-08-20T13:47:58Z</dc:date>
    </item>
  </channel>
</rss>

