<?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: Using ArcPY to turn on labeling in an AGOL hosted feature layer view in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/using-arcpy-to-turn-on-labeling-in-an-agol-hosted/m-p/178758#M13731</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It does return success: True.&amp;nbsp; The label visualization tool also has the scale values preset to what I've set in my script.&amp;nbsp; But there seems to be something that saving in that tool does that isn't happening when I update the label definition in my ArcPy script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Mar 2020 17:05:29 GMT</pubDate>
    <dc:creator>ChrisEmmerich1</dc:creator>
    <dc:date>2020-03-10T17:05:29Z</dc:date>
    <item>
      <title>Using ArcPY to turn on labeling in an AGOL hosted feature layer view</title>
      <link>https://community.esri.com/t5/python-questions/using-arcpy-to-turn-on-labeling-in-an-agol-hosted/m-p/178756#M13729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to use the Python API to turn on labels for a layer in a hosted feature view.&amp;nbsp; My methodology is to retrieve a feature layer collection, loop the layers, and then turn the labeling on as part of setting the symbology.&amp;nbsp; When I complete this, I end up with a section that looks like this in my service definition:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; "drawingInfo":{"renderer":{"type":"simple","label":"","description":"","symbol":{"color":null,"outline":{"color":[230,76,0,255],"width":3,"type":"esriSLS","style":"esriSLSLongDash"},"type":"esriSFS","style":"esriSFSSolid"}},"labelingInfo":[{"labelExpression":null,"labelExpressionInfo":{"expression":"$feature[\"site_name\"]","value":"{site_name}"},"useCodedValues":true,"maxScale":0,"minScale":1725490,"where":null,"labelPlacement":"esriServerPolygonPlacementAlwaysHorizontal","symbol":{"color":[0,0,0,255],"type":"esriTS","backgroundColor":null,"borderLineColor":null,"borderLineSize":null,"haloSize":0,"haloColor":null,"verticalAlignment":"bottom","horizontalAlignment":"center","rightToLeft":false,"angle":0,"xoffset":0,"yoffset":0,"text":"","rotated":false,"kerning":true,"font":{"size":8.25,"style":"normal","decoration":"none","weight":"normal","family":"Arial"}}}],"transparency":0}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I check the layer out in the Visualization module of AGOL I can not see the labels (nor can I see them when I open the later in the map viewer).&amp;nbsp; I have to select the label icon, unclick the label features, click them back on, and then save the layer.&amp;nbsp; Then the labels appear.&amp;nbsp; When I look at the service definition, it looks the same as above.&amp;nbsp; In fact, the only difference is that the last edit date for the layer is updated after I save.&amp;nbsp; Any idea what saving the layer does that my Python scripting (fragment below) needs to do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;view_flc = FeatureLayerCollection.fromitem(view_search[0])&lt;BR /&gt;site_labels = []&lt;BR /&gt;site_labels.append(json.loads(util.site_labels()))&lt;BR /&gt;for lyr in view_flc.layers :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if lyr.properties.name == "Mining Site":&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lyr.manager.update_definition({"drawingInfo": {"renderer":{"type":"simple","label":"","description":"","symbol":&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"color":None,"outline":{"color&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[230,76,0,255],"width":3,"type":"esriSLS","style":"esriSLSLongDash"},&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "type":"esriSFS","style":"esriSFSSolid"}},"labelingInfo":site_labels,"transparency":0}})&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2020 20:18:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-arcpy-to-turn-on-labeling-in-an-agol-hosted/m-p/178756#M13729</guid>
      <dc:creator>ChrisEmmerich1</dc:creator>
      <dc:date>2020-03-05T20:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using ArcPY to turn on labeling in an AGOL hosted feature layer view</title>
      <link>https://community.esri.com/t5/python-questions/using-arcpy-to-turn-on-labeling-in-an-agol-hosted/m-p/178757#M13730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the return message?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check for: {'success': True}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I'm not implementing via the Python API but still working with AGOL items via urllib/urllib2/requests, but I still try to check for return messages when executing these types of things)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Mar 2020 15:02:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-arcpy-to-turn-on-labeling-in-an-agol-hosted/m-p/178757#M13730</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2020-03-06T15:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using ArcPY to turn on labeling in an AGOL hosted feature layer view</title>
      <link>https://community.esri.com/t5/python-questions/using-arcpy-to-turn-on-labeling-in-an-agol-hosted/m-p/178758#M13731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It does return success: True.&amp;nbsp; The label visualization tool also has the scale values preset to what I've set in my script.&amp;nbsp; But there seems to be something that saving in that tool does that isn't happening when I update the label definition in my ArcPy script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2020 17:05:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-arcpy-to-turn-on-labeling-in-an-agol-hosted/m-p/178758#M13731</guid>
      <dc:creator>ChrisEmmerich1</dc:creator>
      <dc:date>2020-03-10T17:05:29Z</dc:date>
    </item>
  </channel>
</rss>

