<?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: Can labels be restyled via the REST API?  Stuck on syntax. in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/can-labels-be-restyled-via-the-rest-api-stuck-on/m-p/635311#M3111</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Alex.&lt;/P&gt;&lt;P&gt;I will give your suggestions a try.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Oct 2017 16:43:15 GMT</pubDate>
    <dc:creator>JosephElfelt1</dc:creator>
    <dc:date>2017-10-27T16:43:15Z</dc:date>
    <item>
      <title>Can labels be restyled via the REST API?  Stuck on syntax.</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/can-labels-be-restyled-via-the-rest-api-stuck-on/m-p/635309#M3109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the ArcGIS Server REST API to display MapServer data that supports &lt;STRONG&gt;dynamic layers&lt;/STRONG&gt;. I know how to restyle line and polygon geometry when my code calls for the tiles.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question: Is it also possible to restyle labels?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following link displays one tile with label data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://services.nationalmap.gov/arcgis/rest/services/govunits/MapServer/export?bboxSR=4326&amp;amp;layers=show:15&amp;amp;size=256,256&amp;amp;imageSR=3857&amp;amp;format=png&amp;amp;transparent=true&amp;amp;dpi=&amp;amp;f=image&amp;amp;bbox=-94.921875,30.751277776257812,-94.21875,30.14512718337613"&gt;https://services.nationalmap.gov/arcgis/rest/services/govunits/MapServer/export?bboxSR=4326&amp;amp;layers=show:15&amp;amp;size=256,256&amp;amp;imageSR=3857&amp;amp;format=png&amp;amp;transparent=true&amp;amp;dpi=&amp;amp;f=image&amp;amp;bbox=-94.921875,30.751277776257812,-94.21875,30.14512718337613&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And here is my call for the same tile where I am trying to make the text magenta:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://services.nationalmap.gov/arcgis/rest/services/govunits/MapServer/export?bboxSR=4326&amp;amp;layers=show:15&amp;amp;size=256,256&amp;amp;imageSR=3857&amp;amp;format=png&amp;amp;transparent=true&amp;amp;dpi=&amp;amp;f=image&amp;amp;dynamicLayers=[{'source':{'type':'mapLayer','mapLayerId':15},'drawingInfo':{'labelingInfo':{'symbol':{'color':[255,0,255,255]}}}}]&amp;amp;bbox=-94.921875,30.751277776257812,-94.21875,30.14512718337613"&gt;https://services.nationalmap.gov/arcgis/rest/services/govunits/MapServer/export?bboxSR=4326&amp;amp;layers=show:15&amp;amp;size=256,256&amp;amp;imageSR=3857&amp;amp;format=png&amp;amp;transparent=true&amp;amp;dpi=&amp;amp;f=image&amp;amp;dynamicLayers=[{'source':{'type':'mapLayer','mapLayerId':15},'drawingInfo':{'labelingInfo':{'symbol':{'color':[255,0,255,255]}}}}]&amp;amp;bbox=-94.921875,30.751277776257812,-94.21875,30.14512718337613&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However my call results in the following nastygram:&lt;/P&gt;&lt;P&gt;{"error":{"code":400,"message":"Invalid dynamic layer definition for labeling classes.","details":[]}}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone shed light and show where I have gone astray in the syntax?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joseph Elfelt&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmappingsupport.com" rel="nofollow" target="_blank"&gt;https://mappingsupport.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Oct 2017 14:39:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/can-labels-be-restyled-via-the-rest-api-stuck-on/m-p/635309#M3109</guid>
      <dc:creator>JosephElfelt1</dc:creator>
      <dc:date>2017-10-02T14:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: Can labels be restyled via the REST API?  Stuck on syntax.</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/can-labels-be-restyled-via-the-rest-api-stuck-on/m-p/635310#M3110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) Validate json through this tool:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://jsonformatter.curiousconcept.com/" title="https://jsonformatter.curiousconcept.com/"&gt;https://jsonformatter.curiousconcept.com/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Make sure the request you are making&amp;nbsp;respects the scale. &amp;nbsp;In your request, I modified the bounding box to be 1/4 the size of what it was&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Use the labelingInfo that's defined on the mapLayer as a starting point, then make your tweaks as needed&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://services.nationalmap.gov/arcgis/rest/services/govunits/MapServer/15?f=pjson" title="https://services.nationalmap.gov/arcgis/rest/services/govunits/MapServer/15?f=pjson"&gt;https://services.nationalmap.gov/arcgis/rest/services/govunits/MapServer/15?f=pjson&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Final result&lt;/P&gt;&lt;P&gt;&lt;A class="link-bare" href="https://services.nationalmap.gov/arcgis/rest/services/govunits/MapServer/export?bbox=-94.921875%2C30.751277776257812%2C-94.61875%2C30.44512718337613&amp;amp;bboxSR=4326&amp;amp;layers=show%3A15&amp;amp;layerDefs=&amp;amp;size=256%2C256&amp;amp;imageSR=3857&amp;amp;format=png32&amp;amp;transparent=true&amp;amp;dpi=&amp;amp;time=&amp;amp;layerTimeOptions=&amp;amp;dynamicLayers=%5B%7B%22id%22%3A+15%2C+%22source%22%3A+%7B%22type%22%3A+%22mapLayer%22%2C+%22mapLayerId%22%3A+15%7D%2C+%22drawingInfo%22%3A+%7B%0D%0A%22renderer%22%3A+%7B%0D%0A%22type%22%3A+%22uniqueValue%22%2C%0D%0A%22field1%22%3A+%22COUNTY_NAME%22%2C%0D%0A%22field2%22%3A+null%2C%0D%0A%22field3%22%3A+null%2C%0D%0A%22fieldDelimiter%22%3A+%22%2C+%22%2C%0D%0A%22defaultSymbol%22%3A+null%2C%0D%0A%22defaultLabel%22%3A+null%2C%0D%0A%22uniqueValueInfos%22%3A+%5B%5D%0D%0A%7D%2C%0D%0A%22labelingInfo%22%3A+%5B%0D%0A%7B%0D%0A%22labelPlacement%22%3A+%22esriServerPolygonPlacementAlwaysHorizontal%22%2C%0D%0A%22where%22%3A+null%2C%0D%0A%22labelExpression%22%3A+%22%5BCOUNTY_NAME%5D+CONCAT+%5C%22+Co%5C%22%22%2C%0D%0A%22useCodedValues%22%3A+true%2C%0D%0A%22symbol%22%3A+%7B%0D%0A%22type%22%3A+%22esriTS%22%2C%0D%0A%22color%22%3A+%5B%0D%0A240%2C%0D%0A0%2C%0D%0A135%2C%0D%0A255%0D%0A%5D%2C%0D%0A%22backgroundColor%22%3A+null%2C%0D%0A%22borderLineColor%22%3A+%5B0255%2C0%2C255%5D%2C%0D%0A%22borderLineSize%22%3A+1%2C%0D%0A%22verticalAlignment%22%3A+%22baseline%22%2C%0D%0A%22horizontalAlignment%22%3A+%22left%22%2C%0D%0A%22rightToLeft%22%3A+false%2C%0D%0A%22angle%22%3A+0%2C%0D%0A%22xoffset%22%3A+0%2C%0D%0A%22yoffset%22%3A+0%2C%0D%0A%22kerning%22%3A+true%2C%0D%0A++++++++++++++++++%22haloSize%22%3A+2%2C%0D%0A++++++++++++++++++%22haloColor%22%3A+%5B255%2C255%2C255%2C255%5D%2C%0D%0A%22font%22%3A+%7B%0D%0A%22family%22%3A+%22Segoe+UI+Semibold%22%2C%0D%0A%22size%22%3A+13%2C%0D%0A%22style%22%3A+%22normal%22%2C%0D%0A%22weight%22%3A+%22normal%22%2C%0D%0A%22decoration%22%3A+%22none%22%0D%0A%7D%0D%0A%7D%2C%0D%0A%22minScale%22%3A+0%2C%0D%0A%22maxScale%22%3A+0%0D%0A%7D%0D%0A%5D%0D%0A%7D%7D%5D&amp;amp;gdbVersion=&amp;amp;mapScale=&amp;amp;rotation=&amp;amp;f=html" title="https://services.nationalmap.gov/arcgis/rest/services/govunits/MapServer/export?bbox=-94.921875%2C30.751277776257812%2C-94.61875%2C30.44512718337613&amp;amp;bboxSR=4326&amp;amp;layers=show%3A15&amp;amp;layerDefs=&amp;amp;size=256%2C256&amp;amp;imageSR=3857&amp;amp;format=png32&amp;amp;transparent=true&amp;amp;dpi=&amp;amp;time=&amp;amp;layerTimeOptions=&amp;amp;dynamicLayers=%5B%7B%22id%22%3A+15%2C+%22source%22%3A+%7B%22type%22%3A+%22mapLayer%22%2C+%22mapLayerId%22%3A+15%7D%2C+%22drawingInfo%22%3A+%7B%0D%0A%22renderer%22%3A+%7B%0D%0A%22type%22%3A+%22uniqueValue%22%2C%0D%0A%22field1%22%3A+%22COUNTY_NAME%22%2C%0D%0A%22field2%22%3A+null%2C%0D%0A%22field3%22%3A+null%2C%0D%0A%22fieldDelimiter%22%3A+%22%2C+%22%2C%0D%0A%22defaultSymbol%22%3A+null%2C%0D%0A%22defaultLabel%22%3A+null%2C%0D%0A%22uniqueValueInfos%22%3A+%5B%5D%0D%0A%7D%2C%0D%0A%22labelingInfo%22%3A+%5B%0D%0A%7B%0D%0A%22labelPlacement%22%3A+%22esriServerPolygonPlacementAlwaysHorizontal%22%2C%0D%0A%22where%22%3A+null%2C%0D%0A%22labelExpression%22%3A+%22%5BCOUNTY_NAME%5D+CONCAT+%5C%22+Co%5C%22%22%2C%0D%0A%22useCodedValues%22%3A+true%2C%0D%0A%22symbol%22%3A+%7B%0D%0A%22type%22%3A+%22esriTS%22%2C%0D%0A%22color%22%3A+%5B%0D%0A240%2C%0D%0A0%2C%0D%0A135%2C%0D%0A255%0D%0A%5D%2C%0D%0A%22backgroundColor%22%3A+null%2C%0D%0A%22borderLineColor%22%3A+%5B0255%2C0%2C255%5D%2C%0D%0A%22borderLineSize%22%3A+1%2C%0D%0A%22verticalAlignment%22%3A+%22baseline%22%2C%0D%0A%22horizontalAlignment%22%3A+%22left%22%2C%0D%0A%22rightToLeft%22%3A+false%2C%0D%0A%22angle%22%3A+0%2C%0D%0A%22xoffset%22%3A+0%2C%0D%0A%22yoffset%22%3A+0%2C%0D%0A%22kerning%22%3A+true%2C%0D%0A++++++++++++++++++%22haloSize%22%3A+2%2C%0D%0A++++++++++++++++++%22haloColor%22%3A+%5B255%2C255%2C255%2C255%5D%2C%0D%0A%22font%22%3A+%7B%0D%0A%22family%22%3A+%22Segoe+UI+Semibold%22%2C%0D%0A%22size%22%3A+13%2C%0D%0A%22style%22%3A+%22normal%22%2C%0D%0A%22weight%22%3A+%22normal%22%2C%0D%0A%22decoration%22%3A+%22none%22%0D%0A%7D%0D%0A%7D%2C%0D%0A%22minScale%22%3A+0%2C%0D%0A%22maxScale%22%3A+0%0D%0A%7D%0D%0A%5D%0D%0A%7D%7D%5D&amp;amp;gdbVersion=&amp;amp;mapScale=&amp;amp;rotation=&amp;amp;f=html"&gt;https://services.nationalmap.gov/arcgis/rest/services/govunits/MapServer/export?bbox=-94.921875%2C30.751277776257812%2C-94.61875%2C30.44512718337613&amp;amp;bboxSR=4326&amp;amp;layers=show%3A15&amp;amp;layerDefs=&amp;amp;size=256%2C256&amp;amp;imageSR=3857&amp;amp;format=png32&amp;amp;transparent=true&amp;amp;dpi=&amp;amp;time=&amp;amp;layerTimeOptions=&amp;amp;dynamicLayers=%5B%7B%22id%22%3A+15%2C+%22source%22%3A+%7B%22type%22%3A+%22mapLayer%22%2C+%22mapLayerId%22%3A+15%7D%2C+%22drawingInfo%22%3A+%7B%0D%0A%22renderer%22%3A+%7B%0D%0A%22type%22%3A+%22uniqueValue%22%2C%0D%0A%22field1%22%3A+%22COUNTY_NAME%22%2C%0D%0A%22field2%22%3A+null%2C%0D%0A%22field3%22%3A+null%2C%0D%0A%22fieldDelimiter%22%3A+%22%2C+%22%2C%0D%0A%22defaultSymbol%22%3A+null%2C%0D%0A%22defaultLabel%22%3A+null%2C%0D%0A%22uniqueValueInfos%22%3A+%5B%5D%0D%0A%7D%2C%0D%0A%22labelingInfo%22%3A+%5B%0D%0A%7B%0D%0A%22labelPlacement%22%3A+%22esriServerPolygonPlacementAlwaysHorizontal%22%2C%0D%0A%22where%22%3A+null%2C%0D%0A%22labelExpression%22%3A+%22%5BCOUNTY_NAME%5D+CONCAT+%5C%22+Co%5C%22%22%2C%0D%0A%22useCodedValues%22%3A+true%2C%0D%0A%22symbol%22%3A+%7B%0D%0A%22type%22%3A+%22esriTS%22%2C%0D%0A%22color%22%3A+%5B%0D%0A240%2C%0D%0A0%2C%0D%0A135%2C%0D%0A255%0D%0A%5D%2C%0D%0A%22backgroundColor%22%3A+null%2C%0D%0A%22borderLineColor%22%3A+%5B0255%2C0%2C255%5D%2C%0D%0A%22borderLineSize%22%3A+1%2C%0D%0A%22verticalAlignment%22%3A+%22baseline%22%2C%0D%0A%22horizontalAlignment%22%3A+%22left%22%2C%0D%0A%22rightToLeft%22%3A+false%2C%0D%0A%22angle%22%3A+0%2C%0D%0A%22xoffset%22%3A+0%2C%0D%0A%22yoffset%22%3A+0%2C%0D%0A%22kerning%22%3A+true%2C%0D%0A++++++++++++++++++%22haloSize%22%3A+2%2C%0D%0A++++++++++++++++++%22haloColor%22%3A+%5B255%2C255%2C255%2C255%5D%2C%0D%0A%22font%22%3A+%7B%0D%0A%22family%22%3A+%22Segoe+UI+Semibold%22%2C%0D%0A%22size%22%3A+13%2C%0D%0A%22style%22%3A+%22normal%22%2C%0D%0A%22weight%22%3A+%22normal%22%2C%0D%0A%22decoration%22%3A+%22none%22%0D%0A%7D%0D%0A%7D%2C%0D%0A%22minScale%22%3A+0%2C%0D%0A%22maxScale%22%3A+0%0D%0A%7D%0D%0A%5D%0D%0A%7D%7D%5D&amp;amp;gdbVersion=&amp;amp;mapScale=&amp;amp;rotation=&amp;amp;f=html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Oct 2017 16:29:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/can-labels-be-restyled-via-the-rest-api-stuck-on/m-p/635310#M3110</guid>
      <dc:creator>AlexThomas1</dc:creator>
      <dc:date>2017-10-27T16:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: Can labels be restyled via the REST API?  Stuck on syntax.</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/can-labels-be-restyled-via-the-rest-api-stuck-on/m-p/635311#M3111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Alex.&lt;/P&gt;&lt;P&gt;I will give your suggestions a try.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Oct 2017 16:43:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/can-labels-be-restyled-via-the-rest-api-stuck-on/m-p/635311#M3111</guid>
      <dc:creator>JosephElfelt1</dc:creator>
      <dc:date>2017-10-27T16:43:15Z</dc:date>
    </item>
  </channel>
</rss>

