<?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: Change Symbols in Measurement Widget in 4.28 in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-symbols-in-measurement-widget-in-4-28/m-p/1526692#M85485</link>
    <description>&lt;P&gt;Thank you so much! This works perfectly! You rock&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 23 Aug 2024 21:32:31 GMT</pubDate>
    <dc:creator>WilsonIonara</dc:creator>
    <dc:date>2024-08-23T21:32:31Z</dc:date>
    <item>
      <title>Change Symbols in Measurement Widget in 4.28</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-symbols-in-measurement-widget-in-4-28/m-p/1526529#M85478</link>
      <description>&lt;P&gt;I am using arcgis core 4.28 and I need to change the symbology for the measurement widget. I know that on 4.17 we can change it&amp;nbsp; by accessing the palette of the event viewModel but this seems impossible in 4.28. I need to have the boundary for area measurement with a symbol with transparent filling so just with just the border and no fill.&amp;nbsp; Any ideas?&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what works in 4.17 but not in 4.28&lt;/P&gt;&lt;P&gt;measurement.watch("activeWidget", function(evt){&lt;/P&gt;&lt;P&gt;if(evt !== null){&lt;/P&gt;&lt;P&gt;if(measurement.activeTool === "distance"){&lt;/P&gt;&lt;P&gt;evt.viewModel.palette.handleColor = [0,128,128,0.5];&lt;BR /&gt;evt.viewModel.palette.pathPrimaryColor = [0,76,76,1];&lt;BR /&gt;evt.viewModel.palette.pathSecondaryColor = [255,255,255,1];&lt;/P&gt;&lt;P&gt;}else{&lt;/P&gt;&lt;P&gt;evt.viewModel.palette.fillColor = [178,216,216,0];&lt;BR /&gt;evt.viewModel.palette.handleColor = [0,128,128,0.5];&lt;BR /&gt;evt.viewModel.palette.pathColor = [0,128,128,0.8];&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 18:03:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-symbols-in-measurement-widget-in-4-28/m-p/1526529#M85478</guid>
      <dc:creator>WilsonIonara</dc:creator>
      <dc:date>2024-08-23T18:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Change Symbols in Measurement Widget in 4.28</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-symbols-in-measurement-widget-in-4-28/m-p/1526639#M85483</link>
      <description>&lt;P&gt;I don't believe there's a documented way to do this.&amp;nbsp; The following solution works, but uses undocumented features, and therefore may not work in a future version of the SDK. so use at your own risk:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const measurement = new Measurement();
measurement.watch("viewModel.activeViewModel.tool", function(tool) {
  if (tool?._measurementLayer) {
    tool._measurementLayer.graphics.on("before-add", function(evt) {
      if (measurement.activeTool == "distance") {
        if (evt.item.symbol.type == "cim")
          evt.item.symbol = new SimpleLineSymbol(); //set a custom line symbol here
      } else if (measurement.activeTool == "area") {
        if (evt.item.symbol.type == "simple-fill")
          evt.item.symbol = new SimpleFillSymbol(); //set a custom fill symbol here
        else if (evt.item.symbol.type == "simple-line")
          evt.item.symbol = new SimpleLineSymbol(); //set a custom line symbol for the outline here
      }
    });
  }
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 19:06:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-symbols-in-measurement-widget-in-4-28/m-p/1526639#M85483</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2024-08-23T19:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: Change Symbols in Measurement Widget in 4.28</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-symbols-in-measurement-widget-in-4-28/m-p/1526692#M85485</link>
      <description>&lt;P&gt;Thank you so much! This works perfectly! You rock&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 21:32:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-symbols-in-measurement-widget-in-4-28/m-p/1526692#M85485</guid>
      <dc:creator>WilsonIonara</dc:creator>
      <dc:date>2024-08-23T21:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Change Symbols in Measurement Widget in 4.28</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-symbols-in-measurement-widget-in-4-28/m-p/1526709#M85486</link>
      <description>&lt;P&gt;Also, is there a way to change also the dots representing the vertices?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 22:15:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-symbols-in-measurement-widget-in-4-28/m-p/1526709#M85486</guid>
      <dc:creator>WilsonIonara</dc:creator>
      <dc:date>2024-08-23T22:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: Change Symbols in Measurement Widget in 4.28</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-symbols-in-measurement-widget-in-4-28/m-p/1526717#M85487</link>
      <description>&lt;P&gt;Yes, it's the same kind of deal.&amp;nbsp; You could easily combine this with the previous one:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const measurement = new Measurement();
measurement.watch("viewModel.activeViewModel.tool", function(tool) {
  if (tool?._manipulatorLayer) {
    tool._manipulatorLayer.graphics.on("before-add", function(evt) {
      if (evt.item.symbol.type == "simple-marker")
          evt.item.symbol = new SimpleMarkerSymbol(); //set a custom marker symbol for the vertex here
    });
  }
});&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 23 Aug 2024 23:17:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-symbols-in-measurement-widget-in-4-28/m-p/1526717#M85487</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2024-08-23T23:17:41Z</dc:date>
    </item>
  </channel>
</rss>

