<?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 Custom Widget for Selecting a Parcel in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-widget-for-selecting-a-parcel/m-p/873178#M13057</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm wondering what the easiest way to create a custom widget where I can select one or more parcels and pass the parcel_id attribute to another service.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to use the draw toolbar to draw a geometry and select the parcels that intersect, similar to this example: &lt;A href="https://developers.arcgis.com/javascript/jssamples/fl_selectfeatures.html" title="https://developers.arcgis.com/javascript/jssamples/fl_selectfeatures.html"&gt;Feature layer with selection | ArcGIS API for JavaScript&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first step:&amp;nbsp; How do I define/cast the parcel layer in my webmap as a FeatureLayer (esri/layers/FeatureLayer)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Apr 2016 00:16:54 GMT</pubDate>
    <dc:creator>AdamCrateau1</dc:creator>
    <dc:date>2016-04-13T00:16:54Z</dc:date>
    <item>
      <title>Custom Widget for Selecting a Parcel</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-widget-for-selecting-a-parcel/m-p/873178#M13057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm wondering what the easiest way to create a custom widget where I can select one or more parcels and pass the parcel_id attribute to another service.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to use the draw toolbar to draw a geometry and select the parcels that intersect, similar to this example: &lt;A href="https://developers.arcgis.com/javascript/jssamples/fl_selectfeatures.html" title="https://developers.arcgis.com/javascript/jssamples/fl_selectfeatures.html"&gt;Feature layer with selection | ArcGIS API for JavaScript&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first step:&amp;nbsp; How do I define/cast the parcel layer in my webmap as a FeatureLayer (esri/layers/FeatureLayer)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2016 00:16:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-widget-for-selecting-a-parcel/m-p/873178#M13057</guid>
      <dc:creator>AdamCrateau1</dc:creator>
      <dc:date>2016-04-13T00:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Widget for Selecting a Parcel</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-widget-for-selecting-a-parcel/m-p/873179#M13058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Adam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I would begin my looking at how other widgets do it. If you look in the OTB esri widgets they use the&lt;/P&gt;&lt;P&gt;'jimu/LayerInfos/LayerInfos' Require and LayerInfos parameter and then code like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;LayerInfos.getInstance(this.map, this.map.itemInfo)
&amp;nbsp; .then(lang.hitch(this, function(operLayerInfos) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; //Now the operLayerInfos is an array of layerInfos that have the&amp;nbsp; layers of the map.
&amp;nbsp; }));&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:55:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-widget-for-selecting-a-parcel/m-p/873179#M13058</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T10:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Widget for Selecting a Parcel</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-widget-for-selecting-a-parcel/m-p/873180#M13059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was able to get the reference to the LayerInfo object in my map using the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;LayerInfos.getInstance(map, map.itemInfo).then(function(layerInfosObject) {
&amp;nbsp;&amp;nbsp; layerInfosObject.getLayerInfoArray().forEach(function(layerInfo) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (layerInfo.title == 'MC Taxlot') {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; taxlotLayerInfo = layerInfosObject.getLayerInfoById(layerInfo.id)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; });&amp;nbsp; 
});
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to be able to do two things with the taxlot layer:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; disable the popup&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; use something similar to the following so the user can click on the map and build a list of taxlots (field = "TAXLOT"), to be passed to another service:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;featureLayer.on('click', function(e){
&amp;nbsp; var taxlotString = esriLang.substitute(e.graphic.attributes, "${TAXLOT}");
&amp;nbsp; var highlightGraphic = new Graphic(e.graphic.geometry, highlightSymbol);
&amp;nbsp; map.graphics.add(highlightGraphic);
&amp;nbsp; taxlotList.push(taxlotString);
&amp;nbsp; });
});&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions, or help pointing me in the right direction would be much appreciated.&amp;nbsp;&amp;nbsp;&amp;nbsp; Adam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:55:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-widget-for-selecting-a-parcel/m-p/873180#M13059</guid>
      <dc:creator>AdamCrateau1</dc:creator>
      <dc:date>2021-12-12T10:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Widget for Selecting a Parcel</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-widget-for-selecting-a-parcel/m-p/873181#M13060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm now able to select parcels and build a list of taxlots using the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;postCreate: function() {
&amp;nbsp; console.log('ParcelSoils::postCreate');
&amp;nbsp; this.inherited(arguments);

},

startup: function() {
&amp;nbsp; console.log('ParcelSoils::startup');


&amp;nbsp; var map = this.map;
&amp;nbsp; var taxlotLayerId, taxlotLayer, taxlotList;

&amp;nbsp; var highlightSymbol = new SimpleFillSymbol(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SimpleFillSymbol.STYLE_SOLID,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new SimpleLineSymbol(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SimpleLineSymbol.STYLE_SOLID,
&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; new Color([255,0,0]), 3
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new Color([125,125,125,0.35])
&amp;nbsp; );

&amp;nbsp; LayerInfos.getInstance(map, map.itemInfo).then(lang.hitch(function(operLayerInfos) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; operLayerInfos.getLayerInfoArray().forEach(function(layerInfo) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (layerInfo.title == 'MC Taxlot') {
&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; taxlotLayerId = layerInfo.id;
&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; console.log('Taxlot layer ID = ', taxlotLayerId)
&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; taxlotLayer = map.getLayer(taxlotLayerId);
&amp;nbsp; taxlotList = [];

&amp;nbsp; this.own(on(taxlotLayer, 'click', function(e) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var taxlotString = esriLang.substitute(e.graphic.attributes, "${TAXLOT}");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var highlightGraphic = new Graphic(e.graphic.geometry, highlightSymbol);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.add(highlightGraphic);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; taxlotList.push(taxlotString);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log('Selection = ' + taxlotList);
&amp;nbsp; }));&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I need to figure out how to temporarily disable the Pop-up for the Taxlot layer...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking through the OTB widget code for that, but it is anything but self-explanatory.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:55:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-widget-for-selecting-a-parcel/m-p/873181#M13060</guid>
      <dc:creator>AdamCrateau1</dc:creator>
      <dc:date>2021-12-12T10:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Widget for Selecting a Parcel</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-widget-for-selecting-a-parcel/m-p/873182#M13061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Adam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See if this works for you:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;LayerInfos.getInstance(map, map.itemInfo).then(lang.hitch(function(operLayerInfos) { 
&amp;nbsp;&amp;nbsp;&amp;nbsp; operLayerInfos.getLayerInfoArray().forEach(function(layerInfo) { 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (layerInfo.title == 'MC Taxlot') { 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; taxlotLayerId = layerInfo.id; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; taxlotLayerInfo = layerInfosObject.getLayerInfoById(layerInfo.id)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; taxlotLayerInfo.disablePopup();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } 
&amp;nbsp;&amp;nbsp;&amp;nbsp; }); 
}));&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:55:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-widget-for-selecting-a-parcel/m-p/873182#M13061</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T10:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Widget for Selecting a Parcel</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-widget-for-selecting-a-parcel/m-p/873183#M13062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That worked!&amp;nbsp;&amp;nbsp; I'm wondering how though...&amp;nbsp;&amp;nbsp; is the .disablePopup() method defined inside the WAB app folder structure?&amp;nbsp; I can't find that method in the API reference for the LayerInfo object. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 23:53:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-widget-for-selecting-a-parcel/m-p/873183#M13062</guid>
      <dc:creator>AdamCrateau1</dc:creator>
      <dc:date>2016-04-21T23:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Widget for Selecting a Parcel</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-widget-for-selecting-a-parcel/m-p/873184#M13063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Adam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; The LayerInfo objects is loosely documented. Don't forget to mark this question as answered by clicking on the "Correct Answer" link on the reply that answered your question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Apr 2016 00:01:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-widget-for-selecting-a-parcel/m-p/873184#M13063</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-04-22T00:01:59Z</dc:date>
    </item>
  </channel>
</rss>

