<?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: N00b question: How am I triggering a TypeError within the API? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/n00b-question-how-am-i-triggering-a-typeerror/m-p/16612#M1511</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var features = new esri.layers.FeatureLayer
&amp;nbsp;&amp;nbsp;&amp;nbsp; (
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "http://gis-app.bucknell.edu:6080/arcgis/rest/services/Pilot_FeatureAccess/MapServer"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,{mode : esri.layers.FeatureLayer.MODE_SNAPSHOT, outFields : ["*"]}
&amp;nbsp;&amp;nbsp;&amp;nbsp; );
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;/PRE&gt;&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When you reference a feature layer, you need to include the layer's ID on the end of the URL. See the &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/fl_ondemand.html" rel="nofollow noopener noreferrer" target="_blank"&gt;Feature Layer sample&lt;/A&gt;&lt;SPAN&gt;, which lists the URL as:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&lt;SPAN style="color: #000088; font-family: monospace;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt; featureLayer &lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000088; font-family: monospace;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt; esri&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt;layers&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt;FeatureLayer&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #999999; font-family: monospace;"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hydrography/Watershed173811/MapServer/1" rel="nofollow noopener noreferrer" target="_blank"&gt;http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hydrography/Watershed173811/MapServer/1&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;note the "1" on the end.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 20:40:05 GMT</pubDate>
    <dc:creator>StephenLead</dc:creator>
    <dc:date>2021-12-10T20:40:05Z</dc:date>
    <item>
      <title>N00b question: How am I triggering a TypeError within the API?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/n00b-question-how-am-i-triggering-a-typeerror/m-p/16605#M1504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Raw beginner here, trying to figure this out. I am attempting to create a FeatureLayer object; at this point, simply creating it and adding it to a map object is all I'm shooting for. Here's my whole script:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.1"&amp;gt;&amp;lt;/script&amp;gt;

&amp;lt;script type="text/javascript"&amp;gt;

dojo.require("esri.map");
dojo.require("esri.layers.FeatureLayer");

function init ( )
{
 var startExtent = new esri.geometry.Extent
 (
&amp;nbsp; -460735.08683161414 // bottom x
&amp;nbsp; ,109870.9884550733 // left y
&amp;nbsp; ,605952.1265091426 // top x
&amp;nbsp; ,521356.80020335224 // right y
&amp;nbsp; ,new esri.SpatialReference ({wkt : "GRS_1980"})
 );

 var map = new esri.Map ("map", {extent : startExtent, fitExtent : true});

 var features = new esri.layers.FeatureLayer
 (
&amp;nbsp; "http://gis-app.bucknell.edu:6080/arcgis/rest/services/Pilot_FeatureAccess/MapServer"
&amp;nbsp; ,{mode : esri.layers.FeatureLayer.MODE_SNAPSHOT, outFields : ["*"]}
 );
 map.addLayers ([features]);
}

dojo.addOnLoad (init);

&amp;lt;/script&amp;gt;
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I load the page, the console is showing two TypeErrors being thrown within the API. I don't even know where to begin looking for the problem at my level of inexperience.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2012 18:24:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/n00b-question-how-am-i-triggering-a-typeerror/m-p/16605#M1504</guid>
      <dc:creator>DonRea</dc:creator>
      <dc:date>2012-09-20T18:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: N00b question: How am I triggering a TypeError within the API?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/n00b-question-how-am-i-triggering-a-typeerror/m-p/16606#M1505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Two things:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;�??is that a valid wkt for a spatial reference? what spatial reference are you trying to use?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;�??you have to add a &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/arcgisdynamicmapservicelayer.htm"&gt;dynamic&lt;/A&gt;&lt;SPAN&gt; or &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/arcgistiledmapservicelayer.htm"&gt;tiled&lt;/A&gt;&lt;SPAN&gt; map service to a map before you can add a feature layer&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2012 19:22:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/n00b-question-how-am-i-triggering-a-typeerror/m-p/16606#M1505</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-09-20T19:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: N00b question: How am I triggering a TypeError within the API?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/n00b-question-how-am-i-triggering-a-typeerror/m-p/16607#M1506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I got the spatial reference name, as well as the extent parameters, from the map information. I've tried several that all seem to be referred to there. Here's what I see:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PROJCS["Albers_PA",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Albers"],PARAMETER["Longitude_Of_Origin",-78.0],PARAMETER["Standard_Parallel_1",40.0],PARAMETER["Standard_Parallel_2",42.0],PARAMETER["Latitude_Of_Origin",39.0],UNIT["Meter",1.0]]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I honestly have no idea what any of that means or what I'm looking at. It looks like several nested spatial references to me, if I had to guess. Is there any doc that explains this stuff?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 12:09:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/n00b-question-how-am-i-triggering-a-typeerror/m-p/16607#M1506</guid>
      <dc:creator>DonRea</dc:creator>
      <dc:date>2012-09-21T12:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: N00b question: How am I triggering a TypeError within the API?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/n00b-question-how-am-i-triggering-a-typeerror/m-p/16608#M1507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is helpful in explaining WKT:&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://webhelp.esri.com/arcgisserver/9.3/java/index.htm#geodatabases/the_ogc-607957855.htm"&gt;http://webhelp.esri.com/arcgisserver/9.3/java/index.htm#geodatabases/the_ogc-607957855.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What about my second bullet point? What happens when you add a dynamic map service layer to your map before attempting to add a feature layer?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 12:46:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/n00b-question-how-am-i-triggering-a-typeerror/m-p/16608#M1507</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-09-21T12:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: N00b question: How am I triggering a TypeError within the API?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/n00b-question-how-am-i-triggering-a-typeerror/m-p/16609#M1508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I see the dynamic layer okay, but I'm still getting the TypeErrors attributed to serverapi.arcgisonline.com:15. Looking at that file, it seems that all of the scripting is on line 15, so that doesn't really narrow it down much.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 12:53:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/n00b-question-how-am-i-triggering-a-typeerror/m-p/16609#M1508</guid>
      <dc:creator>DonRea</dc:creator>
      <dc:date>2012-09-21T12:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: N00b question: How am I triggering a TypeError within the API?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/n00b-question-how-am-i-triggering-a-typeerror/m-p/16610#M1509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What do you see in the firebug console? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you could post a complete, simple page that would be helpful.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 13:41:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/n00b-question-how-am-i-triggering-a-typeerror/m-p/16610#M1509</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-09-21T13:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: N00b question: How am I triggering a TypeError within the API?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/n00b-question-how-am-i-triggering-a-typeerror/m-p/16611#M1510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The TypeErrors are what I'm seeing in the console. Here's the page I'm testing with:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www-test-old.bucknell.edu/script/test/rea/map.html"&gt;http://www-test-old.bucknell.edu/script/test/rea/map.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 14:39:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/n00b-question-how-am-i-triggering-a-typeerror/m-p/16611#M1510</guid>
      <dc:creator>DonRea</dc:creator>
      <dc:date>2012-09-21T14:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: N00b question: How am I triggering a TypeError within the API?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/n00b-question-how-am-i-triggering-a-typeerror/m-p/16612#M1511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var features = new esri.layers.FeatureLayer
&amp;nbsp;&amp;nbsp;&amp;nbsp; (
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "http://gis-app.bucknell.edu:6080/arcgis/rest/services/Pilot_FeatureAccess/MapServer"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,{mode : esri.layers.FeatureLayer.MODE_SNAPSHOT, outFields : ["*"]}
&amp;nbsp;&amp;nbsp;&amp;nbsp; );
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;/PRE&gt;&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When you reference a feature layer, you need to include the layer's ID on the end of the URL. See the &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/fl_ondemand.html" rel="nofollow noopener noreferrer" target="_blank"&gt;Feature Layer sample&lt;/A&gt;&lt;SPAN&gt;, which lists the URL as:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&lt;SPAN style="color: #000088; font-family: monospace;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt; featureLayer &lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000088; font-family: monospace;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt; esri&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt;layers&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt;FeatureLayer&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #999999; font-family: monospace;"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hydrography/Watershed173811/MapServer/1" rel="nofollow noopener noreferrer" target="_blank"&gt;http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hydrography/Watershed173811/MapServer/1&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;note the "1" on the end.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:40:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/n00b-question-how-am-i-triggering-a-typeerror/m-p/16612#M1511</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2021-12-10T20:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: N00b question: How am I triggering a TypeError within the API?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/n00b-question-how-am-i-triggering-a-typeerror/m-p/16613#M1512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;When you reference a feature layer, you need to include the layer's ID on the end of the URL.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Just to add, the reason for this is given in the &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/featurelayer.htm"&gt;reference documentation&lt;/A&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;The feature layer inherits from the graphics layer and can be used to display features from a &lt;STRONG&gt;single layer&lt;/STRONG&gt; in either a Map Service or Feature Service.&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Perhaps the documentation could be improved to be a little bit more explicit/obvious?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example the definition of the url parameter passed to the constructor reads:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;URL to the ArcGIS Server REST resource that represents a feature service&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Perhaps that's a good place to state that it should be a URL to single layer within a service etc.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2012 08:22:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/n00b-question-how-am-i-triggering-a-typeerror/m-p/16613#M1512</guid>
      <dc:creator>__Rich_</dc:creator>
      <dc:date>2012-09-24T08:22:41Z</dc:date>
    </item>
    <item>
      <title>Re: N00b question: How am I triggering a TypeError within the API?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/n00b-question-how-am-i-triggering-a-typeerror/m-p/16614#M1513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the information - all of it was useful - but this specific problem turned out to be my lack of understanding of the map services themselves. I was trying to load a raster layer into a esri.featureLayer, not knowing that there even was such a thing as a feature layer in a map.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2012 16:19:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/n00b-question-how-am-i-triggering-a-typeerror/m-p/16614#M1513</guid>
      <dc:creator>DonRea</dc:creator>
      <dc:date>2012-09-26T16:19:57Z</dc:date>
    </item>
  </channel>
</rss>

