<?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 FeatureLayer not displaying Default symbology in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-not-displaying-default-symbology/m-p/94774#M8655</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was trying to follow the &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/demos/fl/fl_zoomgrid.html" rel="nofollow"&gt;Datagrid with zoom &lt;/A&gt;&lt;SPAN&gt;example to my scenario.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color:&amp;quot;Blue&amp;quot;;"&gt;&lt;SPAN&gt;map.addLayer(new esri.layers.ArcGISDynamicMapServiceLayer ("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://mid036807/ArcGIS/rest/services/SARS/Sudan/MapServer" rel="nofollow" target="_blank"&gt;http://mid036807/ArcGIS/rest/services/SARS/Sudan/MapServer&lt;/A&gt;&lt;SPAN&gt;"));&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt; var maxOffset = function maxOffset(map, pixelTolerance) {&lt;BR /&gt; return Math.floor(map.extent.getWidth() / map.width) * pixelTolerance;&lt;BR /&gt; };&lt;BR /&gt;&lt;BR /&gt; // outFields:["Incident","actor","OBJECTID"]&lt;BR /&gt; //add the states demographic data&lt;BR /&gt;&lt;SPAN&gt; statesLayer = new esri.layers.FeatureLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://mid036807/ArcGIS/rest/services/SARS/SICCQuery/FeatureServer/0" rel="nofollow" target="_blank"&gt;http://mid036807/ArcGIS/rest/services/SARS/SICCQuery/FeatureServer/0&lt;/A&gt;&lt;SPAN&gt;",{&lt;/SPAN&gt;&lt;BR /&gt; mode:esri.layers.FeatureLayer.MODE_SELECTION,&lt;BR /&gt; maxAllowableOffset:maxOffset(map,1),&lt;BR /&gt; outFields:["*"]&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; statesLayer.setDefinitionExpression("Incident='Bombing'");&lt;BR /&gt; //define a selection symbol &lt;BR /&gt; // var highlightSymbol = new esri.symbol.SimpleFillSymbol().setColor( new dojo.Color([50,205,50,.25]));&lt;BR /&gt; var symbol = new esri.symbol.SimpleMarkerSymbol();&lt;BR /&gt; symbol.setColor(new dojo.Color([0,0,255]));&lt;BR /&gt; &lt;BR /&gt; statesLayer.setSelectionSymbol(symbol);&lt;BR /&gt; &lt;BR /&gt; dojo.connect(statesLayer,'onLoad',function(layer){ &lt;BR /&gt; var query = new esri.tasks.Query(); &lt;BR /&gt; query.where = "1=1";&lt;BR /&gt; layer.queryFeatures(query,function(featureSet){&lt;BR /&gt; var items = dojo.map(featureSet.features,function(feature){&lt;BR /&gt; return feature.attributes;&lt;BR /&gt; });&lt;BR /&gt; var data = {&lt;BR /&gt; identifier:"OBJECTID",&lt;BR /&gt; items:items};&lt;BR /&gt; store = new dojo.data.ItemFileReadStore({data:data});&lt;BR /&gt; grid.setStore(store);&lt;BR /&gt; grid.setSortIndex(1,"true"); //sort on the state name &lt;BR /&gt; });&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt; });&lt;BR /&gt; map.addLayer(statesLayer);&lt;BR /&gt; &lt;BR /&gt; //modify the grid so only the STATE_NAME field is sortable&lt;BR /&gt; grid.canSort = function(col){ if(Math.abs(col) == 2) { return true; } else { return false; } };&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was able to add and get all the features into the grid but nothing is displayed in the map. Though nothing is displayed on the map i was able to Zoom into the object using my own symbology.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My expectation is on adding the featurelayer it should render with the default symbology as mentioned in the Map service /Feature service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using Arcgis Server 10.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 25 Dec 2011 15:47:19 GMT</pubDate>
    <dc:creator>KannanAnandavel</dc:creator>
    <dc:date>2011-12-25T15:47:19Z</dc:date>
    <item>
      <title>FeatureLayer not displaying Default symbology</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-not-displaying-default-symbology/m-p/94774#M8655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was trying to follow the &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/demos/fl/fl_zoomgrid.html" rel="nofollow"&gt;Datagrid with zoom &lt;/A&gt;&lt;SPAN&gt;example to my scenario.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color:&amp;quot;Blue&amp;quot;;"&gt;&lt;SPAN&gt;map.addLayer(new esri.layers.ArcGISDynamicMapServiceLayer ("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://mid036807/ArcGIS/rest/services/SARS/Sudan/MapServer" rel="nofollow" target="_blank"&gt;http://mid036807/ArcGIS/rest/services/SARS/Sudan/MapServer&lt;/A&gt;&lt;SPAN&gt;"));&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt; var maxOffset = function maxOffset(map, pixelTolerance) {&lt;BR /&gt; return Math.floor(map.extent.getWidth() / map.width) * pixelTolerance;&lt;BR /&gt; };&lt;BR /&gt;&lt;BR /&gt; // outFields:["Incident","actor","OBJECTID"]&lt;BR /&gt; //add the states demographic data&lt;BR /&gt;&lt;SPAN&gt; statesLayer = new esri.layers.FeatureLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://mid036807/ArcGIS/rest/services/SARS/SICCQuery/FeatureServer/0" rel="nofollow" target="_blank"&gt;http://mid036807/ArcGIS/rest/services/SARS/SICCQuery/FeatureServer/0&lt;/A&gt;&lt;SPAN&gt;",{&lt;/SPAN&gt;&lt;BR /&gt; mode:esri.layers.FeatureLayer.MODE_SELECTION,&lt;BR /&gt; maxAllowableOffset:maxOffset(map,1),&lt;BR /&gt; outFields:["*"]&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; statesLayer.setDefinitionExpression("Incident='Bombing'");&lt;BR /&gt; //define a selection symbol &lt;BR /&gt; // var highlightSymbol = new esri.symbol.SimpleFillSymbol().setColor( new dojo.Color([50,205,50,.25]));&lt;BR /&gt; var symbol = new esri.symbol.SimpleMarkerSymbol();&lt;BR /&gt; symbol.setColor(new dojo.Color([0,0,255]));&lt;BR /&gt; &lt;BR /&gt; statesLayer.setSelectionSymbol(symbol);&lt;BR /&gt; &lt;BR /&gt; dojo.connect(statesLayer,'onLoad',function(layer){ &lt;BR /&gt; var query = new esri.tasks.Query(); &lt;BR /&gt; query.where = "1=1";&lt;BR /&gt; layer.queryFeatures(query,function(featureSet){&lt;BR /&gt; var items = dojo.map(featureSet.features,function(feature){&lt;BR /&gt; return feature.attributes;&lt;BR /&gt; });&lt;BR /&gt; var data = {&lt;BR /&gt; identifier:"OBJECTID",&lt;BR /&gt; items:items};&lt;BR /&gt; store = new dojo.data.ItemFileReadStore({data:data});&lt;BR /&gt; grid.setStore(store);&lt;BR /&gt; grid.setSortIndex(1,"true"); //sort on the state name &lt;BR /&gt; });&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt; });&lt;BR /&gt; map.addLayer(statesLayer);&lt;BR /&gt; &lt;BR /&gt; //modify the grid so only the STATE_NAME field is sortable&lt;BR /&gt; grid.canSort = function(col){ if(Math.abs(col) == 2) { return true; } else { return false; } };&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was able to add and get all the features into the grid but nothing is displayed in the map. Though nothing is displayed on the map i was able to Zoom into the object using my own symbology.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My expectation is on adding the featurelayer it should render with the default symbology as mentioned in the Map service /Feature service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using Arcgis Server 10.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Dec 2011 15:47:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-not-displaying-default-symbology/m-p/94774#M8655</guid>
      <dc:creator>KannanAnandavel</dc:creator>
      <dc:date>2011-12-25T15:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer not displaying Default symbology</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-not-displaying-default-symbology/m-p/94775#M8656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; I was trying to follow the&amp;nbsp;&amp;nbsp; &lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/demos/fl/fl_zoomgrid.html" rel="nofollow"&gt;Datagrid with zoom &lt;/A&gt;example to my scenario.&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt; &lt;SPAN style="color:&amp;quot;Blue&amp;quot;;"&gt;&lt;SPAN&gt;map.addLayer(new esri.layers.ArcGISDynamicMapServiceLayer ("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://mid036807/ArcGIS/rest/services/SARS/Sudan/MapServer" rel="nofollow" target="_blank"&gt;http://mid036807/ArcGIS/rest/services/SARS/Sudan/MapServer&lt;/A&gt;&lt;SPAN&gt;"));&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt; var maxOffset = function maxOffset(map, pixelTolerance) {&lt;BR /&gt; return Math.floor(map.extent.getWidth() / map.width) * pixelTolerance;&lt;BR /&gt; };&lt;BR /&gt;&lt;BR /&gt; // outFields:["Incident","actor","OBJECTID"]&lt;BR /&gt; //add the states demographic data&lt;BR /&gt;&lt;SPAN&gt; statesLayer = new esri.layers.FeatureLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://mid036807/ArcGIS/rest/services/SARS/SICCQuery/FeatureServer/0" rel="nofollow" target="_blank"&gt;http://mid036807/ArcGIS/rest/services/SARS/SICCQuery/FeatureServer/0&lt;/A&gt;&lt;SPAN&gt;",{&lt;/SPAN&gt;&lt;BR /&gt; mode:esri.layers.FeatureLayer.MODE_SELECTION,&lt;BR /&gt; maxAllowableOffset:maxOffset(map,1),&lt;BR /&gt; outFields:["*"]&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; statesLayer.setDefinitionExpression("Incident='Bombing'");&lt;BR /&gt; //define a selection symbol &lt;BR /&gt; // var highlightSymbol = new esri.symbol.SimpleFillSymbol().setColor( new dojo.Color([50,205,50,.25]));&lt;BR /&gt; var symbol = new esri.symbol.SimpleMarkerSymbol();&lt;BR /&gt; symbol.setColor(new dojo.Color([0,0,255]));&lt;BR /&gt; &lt;BR /&gt; statesLayer.setSelectionSymbol(symbol);&lt;BR /&gt; &lt;BR /&gt; dojo.connect(statesLayer,'onLoad',function(layer){ &lt;BR /&gt; var query = new esri.tasks.Query(); &lt;BR /&gt; query.where = "1=1";&lt;BR /&gt; layer.queryFeatures(query,function(featureSet){&lt;BR /&gt; var items = dojo.map(featureSet.features,function(feature){&lt;BR /&gt; return feature.attributes;&lt;BR /&gt; });&lt;BR /&gt; var data = {&lt;BR /&gt; identifier:"OBJECTID",&lt;BR /&gt; items:items};&lt;BR /&gt; store = new dojo.data.ItemFileReadStore({data:data});&lt;BR /&gt; grid.setStore(store);&lt;BR /&gt; grid.setSortIndex(1,"true"); //sort on the state name &lt;BR /&gt; });&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt; });&lt;BR /&gt; map.addLayer(statesLayer);&lt;BR /&gt; &lt;BR /&gt; //modify the grid so only the STATE_NAME field is sortable&lt;BR /&gt; grid.canSort = function(col){ if(Math.abs(col) == 2) { return true; } else { return false; } };&lt;/SPAN&gt; &lt;BR /&gt; &lt;BR /&gt;I was able to add and get all the features into the grid but nothing is displayed in the map. Though nothing is displayed on the map i was able to Zoom into the object using my own symbology.&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;My expectation is on adding the featurelayer it should render with the default symbology as mentioned in the Map service /Feature service.&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;I am using Arcgis Server 10.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Since you used MODE_SELECTION. For selected features to display, you have to use selectFeatures to specify the selected features. Otherwise on features are selected and therefore not display. Look into the API for info.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Dec 2011 17:43:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-not-displaying-default-symbology/m-p/94775#M8656</guid>
      <dc:creator>HemingZhu</dc:creator>
      <dc:date>2011-12-26T17:43:11Z</dc:date>
    </item>
  </channel>
</rss>

