<?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: polygon outline setStyle() and setWidth() not working in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polygon-outline-setstyle-and-setwidth-not-working/m-p/95380#M8710</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Polygon outline setStyle() and setWidth() are not updating the graphic in the map but the object is updating. These are the only two that aren't working for all symbol types and settings.&lt;BR /&gt;&lt;BR /&gt;A &lt;A class="jive-link-external-small" href="http://jsfiddle.net/btfou/hdd4a/" rel="nofollow" target="_blank"&gt;fiddle&lt;/A&gt; to demonstrate.&lt;BR /&gt;&lt;BR /&gt;The functions in question:&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;updateLineType: function (value, graphic) { &amp;nbsp; switch (graphic._type) { &amp;nbsp; case 'polyline': &amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.symbol.setStyle(value); &amp;nbsp;&amp;nbsp;&amp;nbsp; break; &amp;nbsp; case 'polygon': &amp;nbsp;&amp;nbsp;&amp;nbsp; //what is wrong with setting polygon outline style????? &amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.symbol.outline.setStyle(value); &amp;nbsp;&amp;nbsp;&amp;nbsp; break; &amp;nbsp; } &amp;nbsp; graphic.getLayer().refresh(); }, updateLineWidth: function (value, graphic) { &amp;nbsp; switch (graphic._type) { &amp;nbsp; case 'polyline': &amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.symbol.setWidth(value); &amp;nbsp;&amp;nbsp;&amp;nbsp; break; &amp;nbsp; case 'polygon': &amp;nbsp;&amp;nbsp;&amp;nbsp; //what is wrong with setting polygon outline width????? &amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.symbol.outline.setWidth(value); &amp;nbsp;&amp;nbsp;&amp;nbsp; break; &amp;nbsp; } &amp;nbsp; graphic.getLayer().refresh(); },&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can get the desired effect by reseting the symbol on the polygon graphic. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, to turn the polygon outline from solid to dashed you can use:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var symbol = polygon.symbol; symbol.outline.setStyle(SLS.STYLE_DASH); polygon.setSymbol(symbol);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me known if it helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Roberto Pepato.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Jan 2014 22:52:29 GMT</pubDate>
    <dc:creator>RobertoPepato</dc:creator>
    <dc:date>2014-01-22T22:52:29Z</dc:date>
    <item>
      <title>polygon outline setStyle() and setWidth() not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polygon-outline-setstyle-and-setwidth-not-working/m-p/95379#M8709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Polygon outline setStyle() and setWidth() are not updating the graphic in the map but the object is updating. These are the only two that aren't working for all symbol types and settings.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://jsfiddle.net/btfou/hdd4a/" rel="nofollow" target="_blank"&gt;fiddle&lt;/A&gt;&lt;SPAN&gt; to demonstrate.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The functions in question:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;updateLineType: function (value, graphic) { &amp;nbsp; switch (graphic._type) { &amp;nbsp; case 'polyline': &amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.symbol.setStyle(value); &amp;nbsp;&amp;nbsp;&amp;nbsp; break; &amp;nbsp; case 'polygon': &amp;nbsp;&amp;nbsp;&amp;nbsp; //what is wrong with setting polygon outline style????? &amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.symbol.outline.setStyle(value); &amp;nbsp;&amp;nbsp;&amp;nbsp; break; &amp;nbsp; } &amp;nbsp; graphic.getLayer().refresh(); }, updateLineWidth: function (value, graphic) { &amp;nbsp; switch (graphic._type) { &amp;nbsp; case 'polyline': &amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.symbol.setWidth(value); &amp;nbsp;&amp;nbsp;&amp;nbsp; break; &amp;nbsp; case 'polygon': &amp;nbsp;&amp;nbsp;&amp;nbsp; //what is wrong with setting polygon outline width????? &amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.symbol.outline.setWidth(value); &amp;nbsp;&amp;nbsp;&amp;nbsp; break; &amp;nbsp; } &amp;nbsp; graphic.getLayer().refresh(); },&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2014 01:30:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polygon-outline-setstyle-and-setwidth-not-working/m-p/95379#M8709</guid>
      <dc:creator>BenFousek</dc:creator>
      <dc:date>2014-01-22T01:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: polygon outline setStyle() and setWidth() not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polygon-outline-setstyle-and-setwidth-not-working/m-p/95380#M8710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Polygon outline setStyle() and setWidth() are not updating the graphic in the map but the object is updating. These are the only two that aren't working for all symbol types and settings.&lt;BR /&gt;&lt;BR /&gt;A &lt;A class="jive-link-external-small" href="http://jsfiddle.net/btfou/hdd4a/" rel="nofollow" target="_blank"&gt;fiddle&lt;/A&gt; to demonstrate.&lt;BR /&gt;&lt;BR /&gt;The functions in question:&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;updateLineType: function (value, graphic) { &amp;nbsp; switch (graphic._type) { &amp;nbsp; case 'polyline': &amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.symbol.setStyle(value); &amp;nbsp;&amp;nbsp;&amp;nbsp; break; &amp;nbsp; case 'polygon': &amp;nbsp;&amp;nbsp;&amp;nbsp; //what is wrong with setting polygon outline style????? &amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.symbol.outline.setStyle(value); &amp;nbsp;&amp;nbsp;&amp;nbsp; break; &amp;nbsp; } &amp;nbsp; graphic.getLayer().refresh(); }, updateLineWidth: function (value, graphic) { &amp;nbsp; switch (graphic._type) { &amp;nbsp; case 'polyline': &amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.symbol.setWidth(value); &amp;nbsp;&amp;nbsp;&amp;nbsp; break; &amp;nbsp; case 'polygon': &amp;nbsp;&amp;nbsp;&amp;nbsp; //what is wrong with setting polygon outline width????? &amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.symbol.outline.setWidth(value); &amp;nbsp;&amp;nbsp;&amp;nbsp; break; &amp;nbsp; } &amp;nbsp; graphic.getLayer().refresh(); },&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can get the desired effect by reseting the symbol on the polygon graphic. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, to turn the polygon outline from solid to dashed you can use:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var symbol = polygon.symbol; symbol.outline.setStyle(SLS.STYLE_DASH); polygon.setSymbol(symbol);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me known if it helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Roberto Pepato.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2014 22:52:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polygon-outline-setstyle-and-setwidth-not-working/m-p/95380#M8710</guid>
      <dc:creator>RobertoPepato</dc:creator>
      <dc:date>2014-01-22T22:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: polygon outline setStyle() and setWidth() not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polygon-outline-setstyle-and-setwidth-not-working/m-p/95381#M8711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Roberto. That works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's just curious that all other symbol types and their respective set methods work in that manner but these two don't.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2014 23:16:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polygon-outline-setstyle-and-setwidth-not-working/m-p/95381#M8711</guid>
      <dc:creator>BenFousek</dc:creator>
      <dc:date>2014-01-22T23:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: polygon outline setStyle() and setWidth() not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polygon-outline-setstyle-and-setwidth-not-working/m-p/95382#M8712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thanks Roberto. That works.&lt;BR /&gt;&lt;BR /&gt;It's just curious that all other symbol types and their respective set methods work in that manner but these two don't.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Good point. I don't know how to explain why that works for one kind of geometry but it doesn't work for another. Maybe someone from Esri can clarify this question?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jan 2014 07:42:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polygon-outline-setstyle-and-setwidth-not-working/m-p/95382#M8712</guid>
      <dc:creator>RobertoPepato</dc:creator>
      <dc:date>2014-01-23T07:42:21Z</dc:date>
    </item>
  </channel>
</rss>

