<?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: Adding FeatureLayer issue in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-featurelayer-issue/m-p/241540#M22390</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I replied to your question over on &lt;/SPAN&gt;&lt;A href="http://gis.stackexchange.com/a/24552/124"&gt;gis.stackexchange&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 May 2012 13:34:48 GMT</pubDate>
    <dc:creator>derekswingley1</dc:creator>
    <dc:date>2012-05-02T13:34:48Z</dc:date>
    <item>
      <title>Adding FeatureLayer issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-featurelayer-issue/m-p/241539#M22389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi I am currently exploring ARCGIS Javascript API. I have my own map services and feature services up on my local server. I would want to use the FeatuerLayer to select and highlight feature on the map. But when i add my feature service i get the following error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;TypeError: Unable to draw graphic (geometry:null, symbol:null): _14 is undefined**&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not able to figure out what this could be. And I am not sure if the feature layer has been added to the map or not. How could I check if it has been added? I tried using a dojo.connect method with the FeatureLayer with an onClick event. But this doesn't seem to work. Have placed the code below&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;dojo.require("dijit.layout.ContentPane"); dojo.require("esri.map"); dojo.require("esri.layers.FeatureLayer"); dojo.require("esri.tasks.query");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var map; var selectionToolbar; var infoTemplate = new esri.InfoTemplate(); infoTemplate.setTitle("${ROADNAME}"); infoTemplate.setContent( "ROAD NAME: ${LINK_ID}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;" + "CAT${CAT}");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;function init() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; try {&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var initExtent = new&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; esri.geometry.Extent({"xmin":103.55,"ymin":1.13,"xmax":104.16,"ymax":1.56,"spatialReference":{"wkid":4326}});&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map = new esri.Map("map",{extent:esri.geometry.geographicToWebMercator(initExtent)});&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;var basemap = new esri.layers.ArcGISTiledMapServiceLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer" rel="nofollow" target="_blank"&gt;http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//my map service layer &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;var basemap_sing = new esri.layers.ArcGISTiledMapServiceLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://karthikpc:8399/arcgis/rest/services/Carriage_Mercantor/MapServer" rel="nofollow" target="_blank"&gt;http://karthikpc:8399/arcgis/rest/services/Carriage_Mercantor/MapServer&lt;/A&gt;&lt;SPAN&gt;",{ displayLevels:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]});&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; // my feature layer which i am not able to use&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;var featureLayer = new esri.layers.FeatureLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://karthikpc:8399/arcgis/rest/services/Carriage_Mercantor/FeatureServer" rel="nofollow" target="_blank"&gt;http://karthikpc:8399/arcgis/rest/services/Carriage_Mercantor/FeatureServer&lt;/A&gt;&lt;SPAN&gt;", { mode: esri.layers.FeatureLayer.MODE_ONDEMAND, infoTemplate: infoTemplate, outFields: ["*"] });&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;map.addLayer(basemap); map.addLayer(base_sing); map.addLayer(featureLayer);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;dojo.connect(map, "onLoad", initSelectToolbar); dojo.connect(featureLayer."onClick",helloworld); } catch(e){ alert('An error has occurred: '+e.message); }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;function helloworld(){ alert("hello world"); }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;dojo.addOnLoad(init);&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2012 01:58:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-featurelayer-issue/m-p/241539#M22389</guid>
      <dc:creator>karthik_BharadwajT</dc:creator>
      <dc:date>2012-05-02T01:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: Adding FeatureLayer issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-featurelayer-issue/m-p/241540#M22390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I replied to your question over on &lt;/SPAN&gt;&lt;A href="http://gis.stackexchange.com/a/24552/124"&gt;gis.stackexchange&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2012 13:34:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-featurelayer-issue/m-p/241540#M22390</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-05-02T13:34:48Z</dc:date>
    </item>
  </channel>
</rss>

