<?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 Let a user draw a polygon from a custom widget for Web AppBuilder in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/let-a-user-draw-a-polygon-from-a-custom-widget-for/m-p/1172735#M77272</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am currently developing a custom widget with various things a user can do, such as adding isochrones/distances from an external source and querying those for underlying data, saving those to a hosted feature layer etc..&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Now I don't always want to query an isochrone/distance, but let the user draw a polygon themselves.&lt;/P&gt;&lt;P&gt;Since the documentation for the &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/draw-amd.html" target="_self"&gt;draw toolbox&lt;/A&gt; and the first &lt;A href="https://developers.arcgis.com/javascript/3/jssamples/graphics_add.html" target="_self"&gt;example&lt;/A&gt; for using it seemed promising, I am running into issues when trying to initialize a new Draw object.&lt;/P&gt;&lt;P&gt;When trying to initialize the object like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;let tb = new Draw(map);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting this error in my browsers console:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;TypeError: can't access property "getAttribute", this.domNode is null&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Other operations on the map are working perfectly, like clicking to add a marker at the clicked location, adding layers on a layer the map has or `map.getLayer('XYZ')`.&lt;/P&gt;&lt;P&gt;So, what am I missing here?&lt;/P&gt;&lt;P&gt;Any help is appreciated!&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jonas&lt;/P&gt;</description>
    <pubDate>Wed, 11 May 2022 11:57:50 GMT</pubDate>
    <dc:creator>JonasNeubürger</dc:creator>
    <dc:date>2022-05-11T11:57:50Z</dc:date>
    <item>
      <title>Let a user draw a polygon from a custom widget for Web AppBuilder</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/let-a-user-draw-a-polygon-from-a-custom-widget-for/m-p/1172735#M77272</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am currently developing a custom widget with various things a user can do, such as adding isochrones/distances from an external source and querying those for underlying data, saving those to a hosted feature layer etc..&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Now I don't always want to query an isochrone/distance, but let the user draw a polygon themselves.&lt;/P&gt;&lt;P&gt;Since the documentation for the &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/draw-amd.html" target="_self"&gt;draw toolbox&lt;/A&gt; and the first &lt;A href="https://developers.arcgis.com/javascript/3/jssamples/graphics_add.html" target="_self"&gt;example&lt;/A&gt; for using it seemed promising, I am running into issues when trying to initialize a new Draw object.&lt;/P&gt;&lt;P&gt;When trying to initialize the object like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;let tb = new Draw(map);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting this error in my browsers console:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;TypeError: can't access property "getAttribute", this.domNode is null&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Other operations on the map are working perfectly, like clicking to add a marker at the clicked location, adding layers on a layer the map has or `map.getLayer('XYZ')`.&lt;/P&gt;&lt;P&gt;So, what am I missing here?&lt;/P&gt;&lt;P&gt;Any help is appreciated!&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jonas&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 11:57:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/let-a-user-draw-a-polygon-from-a-custom-widget-for/m-p/1172735#M77272</guid>
      <dc:creator>JonasNeubürger</dc:creator>
      <dc:date>2022-05-11T11:57:50Z</dc:date>
    </item>
  </channel>
</rss>

