<?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: Combining multiple widgets into 1 - getting Error when combining widgets in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/combining-multiple-widgets-into-1-getting-error/m-p/1030776#M71873</link>
    <description>&lt;P&gt;You were right! Somehow I had misplaced 2 of them! Thank you so much. I still have a TypeError: stating it can't read a property path or undefined, but I think this one I can hopefully work through.&lt;/P&gt;&lt;P&gt;Thank you, It never occurred to me because I did a simple copy and paste, but I must have missed when I went through deleting duplicates.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Feb 2021 22:07:15 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2021-02-25T22:07:15Z</dc:date>
    <item>
      <title>Combining multiple widgets into 1 - getting Error when combining widgets</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/combining-multiple-widgets-into-1-getting-error/m-p/1030662#M71871</link>
      <description>&lt;P&gt;I have been creating a custom widget that consists of a few 'applications.' I created 3 different widgets and got them all to work and then started to combine them - 2 of them great, then adding the 3rd widget I get the following error:&amp;nbsp;TypeError: UniqueValueRenderer is not a constructor&lt;BR /&gt;at Object.postCreate (:3344/webappbuilder/stemapp/widgets/Location/Widget.js?wab_dv=2.18:95).........&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I would then go line by line and try to rewrite in a different format getting it to work, but it is almost like anything related to the UniqueValueRenderer import was not accepted when defined in the beginning.&amp;nbsp;&amp;nbsp;'esri/renderers/UniqueValueRenderer' is in the Define[] at top and UniqueValueRenderer in Functions[];&amp;nbsp; &amp;nbsp; Below is functions where used:&lt;/P&gt;&lt;P&gt;This particular widgets works fine, until I try to combine with another widget then I get the TypeError. Any ideas? Or maybe something I can use other than UniqueValueRenderer&lt;/P&gt;&lt;P&gt;postCreate: function() {&lt;BR /&gt;this.inherited(arguments);&lt;BR /&gt;console.log('postCreate');&lt;BR /&gt;//this._initTabContainer();&lt;/P&gt;&lt;P&gt;m_lyrAllFacilities = new FeatureLayer(&lt;BR /&gt;this.config.facilitiesURL, { "mode": FeatureLayer.MODE_SNAPSHOT, "outFields": ["*"] });&lt;BR /&gt;m_zoomToFacilities = m_lyrAllFacilities.on('update-end', this.zoomToFacilities);&lt;/P&gt;&lt;P&gt;m_lyrResultRoutes = new GraphicsLayer();&lt;BR /&gt;m_lyrEvents = new GraphicsLayer();&lt;BR /&gt;m_lyrBarriers = new GraphicsLayer();&lt;/P&gt;&lt;P&gt;var slsDefault = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([32, 32, 32]), 2);&lt;BR /&gt;var resultRenderer = new UniqueValueRenderer(slsDefault, this.config.symbology.routeRenderer.field1);&lt;BR /&gt;for (var i = 0; i &amp;lt; this.config.symbology.routeRenderer.uniqueValueInfos.length; i++) {&lt;BR /&gt;var info = this.config.symbology.routeRenderer.uniqueValueInfos[i];&lt;BR /&gt;var sls = new SimpleLineSymbol(info.style, info.sym.color, info.sym.width);&lt;BR /&gt;resultRenderer.addValue(info.value, sls);&lt;BR /&gt;}&lt;BR /&gt;m_lyrResultRoutes.setRenderer(resultRenderer);&lt;/P&gt;&lt;P&gt;m_drawToolbar = new Draw(this.map);&lt;BR /&gt;var sms = new SimpleMarkerSymbol(this.config.symbology.eventSymbol);&lt;BR /&gt;m_drawToolbar.setMarkerSymbol(sms);&lt;BR /&gt;var sls = new SimpleLineSymbol(this.config.symbology.barrierSymbol);&lt;BR /&gt;m_drawToolbar.setLineSymbol(sls);&lt;BR /&gt;m_drawToolbar.on("draw-complete", lang.hitch(this, this.onDrawEvent));&lt;/P&gt;&lt;P&gt;m_closestFacilityTask = new ClosestFacilityTask(this.config.closestFacilitySvc.url);&lt;BR /&gt;},&lt;/P&gt;&lt;P&gt;startup: function() {&lt;BR /&gt;this.inherited(arguments);&lt;BR /&gt;console.log('startup');&lt;/P&gt;&lt;P&gt;var rankNumbers = dom.byId("trRankNumbers");&lt;BR /&gt;var rankColors = dom.byId("trRankColors");&lt;BR /&gt;for (var i = 0; i &amp;lt; this.config.symbology.routeRenderer.uniqueValueInfos.length; i++) {&lt;BR /&gt;var info = this.config.symbology.routeRenderer.uniqueValueInfos[i];&lt;BR /&gt;var className = this.getRankSymbolDomClassName(info.value);&lt;BR /&gt;var aryColor = info.sym.color;&lt;/P&gt;&lt;P&gt;var tdRankNumber = '&amp;lt;td class="' + className + '" '&lt;BR /&gt;+ 'style="text-align:center;"&amp;gt;' + info.value + '&amp;lt;/td&amp;gt;';&lt;BR /&gt;domConstruct.place(tdRankNumber, rankNumbers);&lt;/P&gt;&lt;P&gt;var tdRankColor = '&amp;lt;td class="' + className + '" ' +&lt;BR /&gt;'style="background-color:rgba(' +&lt;BR /&gt;aryColor[0] + ',' + aryColor[1] + ',' + aryColor[2] + ',' + aryColor[3] + ')' +&lt;BR /&gt;';width:15px;height:15px;"&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;'&lt;BR /&gt;domConstruct.place(tdRankColor, rankColors);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;onChangeFacilitiesCount: function (event) {&lt;BR /&gt;console.log("Change Facilities Count: " + event.currentTarget.value);&lt;BR /&gt;var count = event.currentTarget.value;&lt;BR /&gt;for (var i = 0; i &amp;lt; this.config.symbology.routeRenderer.uniqueValueInfos.length; i++) {&lt;BR /&gt;var className = this.getRankSymbolDomClassName(i + 1);&lt;BR /&gt;if (i + 1 &amp;lt;= count)&lt;BR /&gt;query("." + className).style("visibility", "visible");&lt;BR /&gt;else&lt;BR /&gt;query("." + className).style("visibility", "hidden");&lt;BR /&gt;}&lt;BR /&gt;},&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2021 20:12:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/combining-multiple-widgets-into-1-getting-error/m-p/1030662#M71871</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-02-25T20:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: Combining multiple widgets into 1 - getting Error when combining widgets</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/combining-multiple-widgets-into-1-getting-error/m-p/1030735#M71872</link>
      <description>&lt;P&gt;Have you checked whether the order of the require modules and the function arguments are correct?&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2021 21:30:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/combining-multiple-widgets-into-1-getting-error/m-p/1030735#M71872</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-02-25T21:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Combining multiple widgets into 1 - getting Error when combining widgets</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/combining-multiple-widgets-into-1-getting-error/m-p/1030776#M71873</link>
      <description>&lt;P&gt;You were right! Somehow I had misplaced 2 of them! Thank you so much. I still have a TypeError: stating it can't read a property path or undefined, but I think this one I can hopefully work through.&lt;/P&gt;&lt;P&gt;Thank you, It never occurred to me because I did a simple copy and paste, but I must have missed when I went through deleting duplicates.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2021 22:07:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/combining-multiple-widgets-into-1-getting-error/m-p/1030776#M71873</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-02-25T22:07:15Z</dc:date>
    </item>
  </channel>
</rss>

