<?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 Getting a string.substitute could not find key &amp;quot;layername&amp;quot; in template error when trying to initalize CreateDriveTimeAreas in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getting-a-string-substitute-could-not-find-key/m-p/699580#M65162</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to create drive time areas for a point. &amp;nbsp;When I call the routine that calls the code I get the following error:&lt;/P&gt;&lt;P&gt;string.substitute could not find key "layername" in template. &amp;nbsp;I am following the scarce documentation for this so this is what I am doing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var params =&lt;BR /&gt; {&lt;BR /&gt; id: "analysisTool",&lt;BR /&gt; inputLayer: myLayer,&lt;BR /&gt;&lt;SPAN&gt; portalUrl: "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fwww.arcgis.com" rel="nofollow" target="_blank"&gt;https://www.arcgis.com&lt;/A&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;&lt;BR /&gt; showHelp: false,&lt;BR /&gt; map: map,&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;var analysisTool = new CreateDriveTimeAreas(params, "driveTimesDiv");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code breaks when it calls the instantiation of the CreateDriveTimesAreas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone please tell me what I am doing wrong here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Apr 2017 13:37:14 GMT</pubDate>
    <dc:creator>JoePiasente</dc:creator>
    <dc:date>2017-04-10T13:37:14Z</dc:date>
    <item>
      <title>Getting a string.substitute could not find key "layername" in template error when trying to initalize CreateDriveTimeAreas</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getting-a-string-substitute-could-not-find-key/m-p/699580#M65162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to create drive time areas for a point. &amp;nbsp;When I call the routine that calls the code I get the following error:&lt;/P&gt;&lt;P&gt;string.substitute could not find key "layername" in template. &amp;nbsp;I am following the scarce documentation for this so this is what I am doing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var params =&lt;BR /&gt; {&lt;BR /&gt; id: "analysisTool",&lt;BR /&gt; inputLayer: myLayer,&lt;BR /&gt;&lt;SPAN&gt; portalUrl: "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fwww.arcgis.com" rel="nofollow" target="_blank"&gt;https://www.arcgis.com&lt;/A&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;&lt;BR /&gt; showHelp: false,&lt;BR /&gt; map: map,&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;var analysisTool = new CreateDriveTimeAreas(params, "driveTimesDiv");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code breaks when it calls the instantiation of the CreateDriveTimesAreas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone please tell me what I am doing wrong here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Apr 2017 13:37:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getting-a-string-substitute-could-not-find-key/m-p/699580#M65162</guid>
      <dc:creator>JoePiasente</dc:creator>
      <dc:date>2017-04-10T13:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: Getting a string.substitute could not find key "layername" in template error when trying to initalize CreateDriveTimeAreas</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getting-a-string-substitute-could-not-find-key/m-p/699581#M65163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/220804"&gt;Joe Piasente&lt;/A&gt;‌ I as well am stuck with the similar issue. I tried creating a new FeatureLayer from URL with additional options but did not succeed. Were you able to find any solution or further reference for above error?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Nov 2017 09:19:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getting-a-string-substitute-could-not-find-key/m-p/699581#M65163</guid>
      <dc:creator>WilliamHynes</dc:creator>
      <dc:date>2017-11-01T09:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: Getting a string.substitute could not find key "layername" in template error when trying to initalize CreateDriveTimeAreas</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getting-a-string-substitute-could-not-find-key/m-p/699582#M65164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you add a "name" property to your input layer, you'll work around there.&amp;nbsp; In the CreateDriveTimeAreas code, "layername" is set to your inputLayer.name.&amp;nbsp; Layers from ArcGIS Online have this.&amp;nbsp; Layers created from instantiating your own FeatureLayer do not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, add:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;myLayer.name = "Some name";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, in my own case, I still could not get CreateDriveTimeAreas to work, but the step above did get rid of that "layername" error message for me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2018 19:51:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getting-a-string-substitute-could-not-find-key/m-p/699582#M65164</guid>
      <dc:creator>MattNicol</dc:creator>
      <dc:date>2018-02-15T19:51:02Z</dc:date>
    </item>
  </channel>
</rss>

