<?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: Combining Scripts in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/combining-scripts/m-p/98355#M8998</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Ken,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I got it. I had to move the HomeButton directly after Map in order for it to work. I also found the blog post informative. That is the type of reading I am looking for to help me to make sense of this.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 May 2014 13:45:52 GMT</pubDate>
    <dc:creator>JohnChurchill</dc:creator>
    <dc:date>2014-05-15T13:45:52Z</dc:date>
    <item>
      <title>Combining Scripts</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/combining-scripts/m-p/98353#M8996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I'm just getting started with using the ArcGIS API for Javascript. I have been trying samples using the sandbox site. I've had some general trouble trying to combine the functionality of one sample with another. So what I'm looking for is some guidance in how to effectively combine these scripts.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, I brought up the &lt;/SPAN&gt;&lt;A href="http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=widget_measurement" rel="nofollow noopener noreferrer" target="_blank"&gt;measurement sample&lt;/A&gt;&lt;SPAN&gt; and I wanted to add a home button. So I added references to "esri/dijit/HomeButton" to the list in the "Require" function and added "HomeButton" to the function defined as the second argument in "Require" and then added code&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var home = new HomeButton({
&amp;nbsp; map: map
}, "HomeButton");
home.startup();
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;at the end (before the final "});" near the end of the &amp;lt;/script&amp;gt; tag.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems to make everything stop working if everything isn't in the right order and even putting it at the end means that it works up until that code snippet that I included runs (I can check by adding an "alert" popup and I see that it stops working).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Questions:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Should this work (if so, what am I doing wrong)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Am I correct in assuming that listing these items (objects ?) in the wrong order will upset the script or should I be able to put that "HomeButton" anywhere in that list of arguments?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;function(dom, Color, keys, parser, esriConfig, has, Map, SnappingManager, Measurement, FeatureLayer, SimpleRenderer, GeometryService, SimpleLineSymbol, SimpleFillSymbol, HomeButton){&amp;lt;lots of code&amp;gt;}&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:08:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/combining-scripts/m-p/98353#M8996</guid>
      <dc:creator>JohnChurchill</dc:creator>
      <dc:date>2021-12-11T06:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Scripts</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/combining-scripts/m-p/98354#M8997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;A good place to start is this &lt;/SPAN&gt;&lt;A href="http://blogs.esri.com/esri/arcgis/2013/10/14/the-abcs-of-amd/" rel="nofollow noopener noreferrer" target="_blank"&gt;blog&lt;/A&gt;&lt;SPAN&gt;, which should help you get up to speed on using AMD. I'm guessing what's going on is you have the HomeButton module out of place in the require statement. While you can leave off the arguments in the function section, any arguments will have to be in the same order as when they are called in the require part.&amp;nbsp; For example&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; require([
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "esri/map", "esri/layers/FeatureLayer",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "dojo/parser", "dijit/layout/BorderContainer", "dojo/domReady!"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ], function (
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Map, FeatureLayer,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; parser
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) {&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't have an argument for "BoarderContainer, but it has to come after any modules that have an argument in the function section.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:08:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/combining-scripts/m-p/98354#M8997</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-12-11T06:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Scripts</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/combining-scripts/m-p/98355#M8998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Ken,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I got it. I had to move the HomeButton directly after Map in order for it to work. I also found the blog post informative. That is the type of reading I am looking for to help me to make sense of this.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 May 2014 13:45:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/combining-scripts/m-p/98355#M8998</guid>
      <dc:creator>JohnChurchill</dc:creator>
      <dc:date>2014-05-15T13:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Scripts</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/combining-scripts/m-p/98356#M8999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Glad to help. Don't forget to click the checkbox in the post to signify your question was answered. This will help others as they search for solutions for similar questions. See this &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/forums-mvp/"&gt;page&lt;/A&gt;&lt;SPAN&gt; for more information.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 May 2014 16:12:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/combining-scripts/m-p/98356#M8999</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2014-05-15T16:12:44Z</dc:date>
    </item>
  </channel>
</rss>

