<?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 Automatically select the default feature in TemplatePicker ARCGIS Javascript in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/automatically-select-the-default-feature-in/m-p/388337#M35832</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;I am using this example to implement the editing on my map.&lt;/P&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;A href="http://developers.arcgis.com/javascript/samples/ed_feature_creation/" rel="nofollow" style="text-decoration: underline; color: #589fd2; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;Editing Without Widget ARCGIS Javascript&lt;/A&gt;&lt;/P&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;The code employs a templatepicker which uses the layers on the map to show the features which can be selected and hence editing can be done on those features.&lt;/P&gt;&lt;PRE class="prettyprint prettyprinted lang-js" style="margin-bottom: 10px; padding: 5px; font-size: 12px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #393318; background-color: #eeeeee;"&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222;"&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; templatePicker &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;new&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;TemplatePicker&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;({&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; featureLayers&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; layers&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; rows&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;"auto"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; columns&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #953838;"&gt;2&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; grouping&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;true&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; style&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;"height: auto; overflow: auto;"&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;},&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;"templatePickerDiv"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;);&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;However, you have to select a feature yourself before starting to edit it. After selection, the selected feature is fetched as&lt;/P&gt;&lt;PRE class="prettyprint prettyprinted lang-js" style="margin-bottom: 10px; padding: 5px; font-size: 12px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #393318; background-color: #eeeeee;"&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222;"&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;selectedTemplate &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; templatePicker&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;getSelected&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;();&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;This &lt;STRONG&gt;selectedTemplate&lt;/STRONG&gt; is then selected to put the points on the map.&lt;/P&gt;&lt;PRE class="prettyprint prettyprinted lang-js" style="margin-bottom: 10px; padding: 5px; font-size: 12px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #393318; background-color: #eeeeee;"&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222;"&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;selectedTemplate&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;featureLayer&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;applyEdits&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;([&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;newGraphic&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;],&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;null&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;null&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;);&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;STRONG&gt;The problem is&lt;/STRONG&gt;, I want to select the default or first feature in the templatePicker automatically as it loads. I tried finding if TemplatePicker has any method to select any feature but I couldnt. Is there any way that I could do that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Jan 2015 17:05:12 GMT</pubDate>
    <dc:creator>TahaSiddiqui</dc:creator>
    <dc:date>2015-01-19T17:05:12Z</dc:date>
    <item>
      <title>Automatically select the default feature in TemplatePicker ARCGIS Javascript</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/automatically-select-the-default-feature-in/m-p/388337#M35832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;I am using this example to implement the editing on my map.&lt;/P&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;A href="http://developers.arcgis.com/javascript/samples/ed_feature_creation/" rel="nofollow" style="text-decoration: underline; color: #589fd2; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;Editing Without Widget ARCGIS Javascript&lt;/A&gt;&lt;/P&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;The code employs a templatepicker which uses the layers on the map to show the features which can be selected and hence editing can be done on those features.&lt;/P&gt;&lt;PRE class="prettyprint prettyprinted lang-js" style="margin-bottom: 10px; padding: 5px; font-size: 12px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #393318; background-color: #eeeeee;"&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222;"&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; templatePicker &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;new&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;TemplatePicker&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;({&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; featureLayers&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; layers&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; rows&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;"auto"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; columns&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #953838;"&gt;2&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; grouping&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;true&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; style&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;"height: auto; overflow: auto;"&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;},&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;"templatePickerDiv"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;);&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;However, you have to select a feature yourself before starting to edit it. After selection, the selected feature is fetched as&lt;/P&gt;&lt;PRE class="prettyprint prettyprinted lang-js" style="margin-bottom: 10px; padding: 5px; font-size: 12px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #393318; background-color: #eeeeee;"&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222;"&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;selectedTemplate &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; templatePicker&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;getSelected&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;();&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;This &lt;STRONG&gt;selectedTemplate&lt;/STRONG&gt; is then selected to put the points on the map.&lt;/P&gt;&lt;PRE class="prettyprint prettyprinted lang-js" style="margin-bottom: 10px; padding: 5px; font-size: 12px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #393318; background-color: #eeeeee;"&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222;"&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;selectedTemplate&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;featureLayer&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;applyEdits&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;([&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;newGraphic&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;],&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;null&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;null&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;);&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;STRONG&gt;The problem is&lt;/STRONG&gt;, I want to select the default or first feature in the templatePicker automatically as it loads. I tried finding if TemplatePicker has any method to select any feature but I couldnt. Is there any way that I could do that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 17:05:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/automatically-select-the-default-feature-in/m-p/388337#M35832</guid>
      <dc:creator>TahaSiddiqui</dc:creator>
      <dc:date>2015-01-19T17:05:12Z</dc:date>
    </item>
  </channel>
</rss>

