<?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: TypeError: Cannot call method 'moveToBack' of null in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typeerror-cannot-call-method-movetoback-of-null/m-p/65336#M5732</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I know that I can access the PNG file. I have not been doing any debugging aside from making some lines comments to see which produce the errors. My data is in a different coordinate system than Web Mercator. It is in NAD_1983_StatePlane_Maryland_FIPS_1900_Feet. I have changed the Spatial Reference a few times but this has only seemed to increase my errors.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Jun 2013 13:21:25 GMT</pubDate>
    <dc:creator>MichaelGlassman2</dc:creator>
    <dc:date>2013-06-26T13:21:25Z</dc:date>
    <item>
      <title>TypeError: Cannot call method 'moveToBack' of null</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typeerror-cannot-call-method-movetoback-of-null/m-p/65334#M5730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have been using the &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/en/javascript/jssamples/routetask_directions.html" rel="nofollow noopener noreferrer" target="_blank"&gt;"Get driving directions"&lt;/A&gt;&lt;SPAN&gt; sample template with my own network analysis service. I have been having some trouble getting the graphics of the start and stop points and the route to appear. Additionally, when I changed from using an ESRI basemap to a Tiled Map Service I received this error when trying to run the sample in the JavaScript Sandbox: "TypeError: Cannot call method 'moveToBack' of null". Here is the code snippet where the error is occurring: &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Show the result of the routing task.
&amp;nbsp;&amp;nbsp;&amp;nbsp; function showRoute(solveResult) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var data = [];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(grid) grid.refresh();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var directions = solveResult.routeResults[0].directions;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; directionFeatures = directions.features;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var routeSymbol = new esri.symbol.SimpleLineSymbol().setColor(new dojo.Color([0,0,255,0.5])).setWidth(4);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Add route to the map.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var routeGraphic = new esri.Graphic(directions.mergedGeometry, routeSymbol); 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.add(routeGraphic);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; routeGraphic.getDojoShape().moveToBack();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.setExtent(directions.extent, true);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not very experienced with coding with the exception of Python. When I comment out the line with "moveToBack" the error does not accur and the routing works but the graphics still do not appear. Any help anyone may be able to give would be greatly appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:31:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typeerror-cannot-call-method-movetoback-of-null/m-p/65334#M5730</guid>
      <dc:creator>MichaelGlassman2</dc:creator>
      <dc:date>2021-12-10T22:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: TypeError: Cannot call method 'moveToBack' of null</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typeerror-cannot-call-method-movetoback-of-null/m-p/65335#M5731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;a couple things...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1.&amp;nbsp; the graphics in the sample seem to be being pulled from our own website.&amp;nbsp; in the developer tools in the browser (or fiddler), can you confirm that you aren't having trouble downloading them?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var fromSymbol = new esri.symbol.PictureMarkerSymbol({
&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; "url":"http://static.arcgis.com/images/Symbols/Transportation/GreenSquareDaymark.png",&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2.&amp;nbsp; the spatial reference of the returned route itself is dictated by the properties we set when we configure the route parameters.&amp;nbsp; is your new ArcGISTiledMapServiceLayer in a different coordinate system?&amp;nbsp; if so, you'll have to update the line of code below.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;routeParams.outSpatialReference = new esri.SpatialReference({ wkid:102100 });&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;when i tested using one of our WGS84 services (and updated the SR to be "4326"), i saw the same error in the sandbox that you are describing, but not when i ran the same application on my own machine.&amp;nbsp; im not sure whats going on there.&amp;nbsp; how are you even debugging in the sandbox to determine the exact line of the error?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:31:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typeerror-cannot-call-method-movetoback-of-null/m-p/65335#M5731</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2021-12-10T22:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: TypeError: Cannot call method 'moveToBack' of null</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typeerror-cannot-call-method-movetoback-of-null/m-p/65336#M5732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I know that I can access the PNG file. I have not been doing any debugging aside from making some lines comments to see which produce the errors. My data is in a different coordinate system than Web Mercator. It is in NAD_1983_StatePlane_Maryland_FIPS_1900_Feet. I have changed the Spatial Reference a few times but this has only seemed to increase my errors.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 13:21:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typeerror-cannot-call-method-movetoback-of-null/m-p/65336#M5732</guid>
      <dc:creator>MichaelGlassman2</dc:creator>
      <dc:date>2013-06-26T13:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: TypeError: Cannot call method 'moveToBack' of null</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typeerror-cannot-call-method-movetoback-of-null/m-p/65337#M5733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;have you tried moving outside the sandbox?&amp;nbsp; i'm not seeing the same error once i paste my code into a new HTML file.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 14:23:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typeerror-cannot-call-method-movetoback-of-null/m-p/65337#M5733</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2013-06-26T14:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: TypeError: Cannot call method 'moveToBack' of null</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typeerror-cannot-call-method-movetoback-of-null/m-p/65338#M5734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can I use Notepad++ for this or should I download a different program?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jun 2013 17:02:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typeerror-cannot-call-method-movetoback-of-null/m-p/65338#M5734</guid>
      <dc:creator>MichaelGlassman2</dc:creator>
      <dc:date>2013-06-28T17:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: TypeError: Cannot call method 'moveToBack' of null</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typeerror-cannot-call-method-movetoback-of-null/m-p/65339#M5735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;plenty of &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/en/javascript/jshelp/intro_devenv.html"&gt;options&lt;/A&gt;&lt;SPAN&gt;, but I personally love Notepad++...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jun 2013 17:04:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typeerror-cannot-call-method-movetoback-of-null/m-p/65339#M5735</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2013-06-28T17:04:03Z</dc:date>
    </item>
  </channel>
</rss>

