<?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: Snapping with SketchViewModel for JimuLayerView Layer in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/snapping-with-sketchviewmodel-for-jimulayerview/m-p/1643176#M20498</link>
    <description>&lt;P&gt;Code seems good.&lt;/P&gt;&lt;P&gt;Error messages and snapshots will help.&lt;/P&gt;</description>
    <pubDate>Tue, 19 Aug 2025 08:28:46 GMT</pubDate>
    <dc:creator>Allen_Zhang</dc:creator>
    <dc:date>2025-08-19T08:28:46Z</dc:date>
    <item>
      <title>Snapping with SketchViewModel for JimuLayerView Layer</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/snapping-with-sketchviewmodel-for-jimulayerview/m-p/1640686#M20384</link>
      <description>&lt;P&gt;Hi all &amp;amp;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1104"&gt;@RobertScheitlin__GISP&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/677423"&gt;@JeffreyThompson2&lt;/a&gt;&amp;nbsp;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I was trying to apply snapping functionality in the SketchViewModel using experience builder custom widget. Here is the code I was using.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;this.sketchViewModel=new SketchViewModel({&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;view:this.state.jimuMapView.view,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;layer:this.GraphicsLayer,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pointSymbol: jsonUtils.fromJSON(defaultSnapSymbol) as any,&lt;BR /&gt;})&lt;BR /&gt;this.sketchViewModel.snappingOptions= {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;enabled: true, // global snapping is turned on&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;selfEnabled: true,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;featureEnabled: true,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;featureSources: this.getDefaultSnapSources(this.state.jimuMapView,["dataSource_1-name_6192-48"])&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;getDefaultSnapSources = (jimuMapView: JimuMapView, defaultSnapLayers) =&amp;gt; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (!jimuMapView) return []&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//await jimuMapView.whenAllJimuLayerViewLoaded()&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (!jimuMapView?.jimuLayerViews) return []&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const allViewLayerKeys = Object.keys(jimuMapView.jimuLayerViews)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const snapLayersSources = allViewLayerKeys.filter(layerViewId =&amp;gt; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;defaultSnapLayers?.includes(jimuMapView.jimuLayerViews[layerViewId].layerDataSourceId)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}).map(lvId =&amp;gt; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;layer: jimuMapView.jimuLayerViews[lvId].layer,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;enabled: true&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;})&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return snapLayersSources&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Srikanth&lt;/P&gt;</description>
      <pubDate>Sun, 10 Aug 2025 07:29:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/snapping-with-sketchviewmodel-for-jimulayerview/m-p/1640686#M20384</guid>
      <dc:creator>VenkataSrikanthDasari</dc:creator>
      <dc:date>2025-08-10T07:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Snapping with SketchViewModel for JimuLayerView Layer</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/snapping-with-sketchviewmodel-for-jimulayerview/m-p/1643176#M20498</link>
      <description>&lt;P&gt;Code seems good.&lt;/P&gt;&lt;P&gt;Error messages and snapshots will help.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Aug 2025 08:28:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/snapping-with-sketchviewmodel-for-jimulayerview/m-p/1643176#M20498</guid>
      <dc:creator>Allen_Zhang</dc:creator>
      <dc:date>2025-08-19T08:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: Snapping with SketchViewModel for JimuLayerView Layer</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/snapping-with-sketchviewmodel-for-jimulayerview/m-p/1643468#M20505</link>
      <description>&lt;P&gt;Thanks for responding.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I identified the root cause of the issue: JimuLayerView should not be used, and snapping is only supported on FeatureLayer, GraphicsLayer, and a few others. To resolve this, I created a new FeatureLayer and added it to the map.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Aug 2025 20:48:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/snapping-with-sketchviewmodel-for-jimulayerview/m-p/1643468#M20505</guid>
      <dc:creator>VenkataSrikanthDasari</dc:creator>
      <dc:date>2025-08-19T20:48:51Z</dc:date>
    </item>
  </channel>
</rss>

