<?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: Graphics not showing on the map. in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-not-showing-on-the-map/m-p/519834#M48431</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got it. It was the spatial reference issue. The basemap had different spatial reference than&amp;nbsp; feature layer. That was causing the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 31 Jan 2015 14:46:34 GMT</pubDate>
    <dc:creator>SanajyJadhav</dc:creator>
    <dc:date>2015-01-31T14:46:34Z</dc:date>
    <item>
      <title>Graphics not showing on the map.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-not-showing-on-the-map/m-p/519833#M48430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm developing study application using ArcGIS API for JavaScript.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this application, I'm executing query on a feature layer added to a map using simple where clause,e.g. STATE_NAME = 'Arizona'. In the query completed event,I'm getting my feature as a result. Then I add it as graphic to the map. I debugged the code in Firefox and confirmed that It is getting added to the map successfully.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But my problem is, this graphics is not visible on the map in the browser. I have put my code below for reference.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="javascript" name="code"&gt;define(["esri/tasks/QueryTask", "esri/tasks/query", "dojo/_base/lang", "dojo/on", "esri/symbols/SimpleFillSymbol", "esri/Color", "esri/symbols/SimpleLineSymbol", "esri/graphic", "esri/map"], &amp;nbsp; function(QueryTask,Query,lang,on,SimpleFillSymbol,Color,SimpleLineSymbol,Graphic,Map){&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; return{&amp;nbsp; &amp;nbsp; queryStatesLayer:function(sqlString,layerURL,outFlds,mapControl){ &amp;nbsp; var query,queryTask; &amp;nbsp; queryTask = new QueryTask(layerURL); &amp;nbsp; query = new Query(); &amp;nbsp; query.returnGeometry = true; &amp;nbsp; query.where = sqlString;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; //configure the call back function &amp;nbsp; queryTask.execute(query, lang.hitch(this,function(results){ &amp;nbsp; this.queryCompleted(results,mapControl); &amp;nbsp; })); &amp;nbsp; },&amp;nbsp; &amp;nbsp; //this function is called when the query is completed &amp;nbsp; queryCompleted:function(featureSet,map){ &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; //remove all graphics on the maps graphics layer &amp;nbsp; map.graphics.clear();&amp;nbsp; &amp;nbsp; var resultFeatures = featureSet.features; &amp;nbsp; var symbol = new SimpleFillSymbol().setColor(null).outline.setColor("blue");&amp;nbsp; &amp;nbsp; for (var i=0, il=featureSet.features.length; i&amp;lt;il; i++) { &amp;nbsp; var graphic = featureSet.features&lt;I&gt;; &amp;nbsp; graphic.setSymbol(symbol); &amp;nbsp; map.graphics.add(graphic); &amp;nbsp; alert(map.graphics.graphics.length); &amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; }//queryCompleted function ends here.. &amp;nbsp; }; }); //define function ends..&lt;/I&gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would appreciate any help on this problem. I'm not being able to figure out why the graphics is not showing up on the map.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;S.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Jan 2015 08:22:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-not-showing-on-the-map/m-p/519833#M48430</guid>
      <dc:creator>SanajyJadhav</dc:creator>
      <dc:date>2015-01-31T08:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics not showing on the map.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-not-showing-on-the-map/m-p/519834#M48431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got it. It was the spatial reference issue. The basemap had different spatial reference than&amp;nbsp; feature layer. That was causing the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Jan 2015 14:46:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-not-showing-on-the-map/m-p/519834#M48431</guid>
      <dc:creator>SanajyJadhav</dc:creator>
      <dc:date>2015-01-31T14:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics not showing on the map.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-not-showing-on-the-map/m-p/519835#M48432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't forget to mark your answer as correct.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2015 13:56:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-not-showing-on-the-map/m-p/519835#M48432</guid>
      <dc:creator>TimWitt2</dc:creator>
      <dc:date>2015-02-02T13:56:27Z</dc:date>
    </item>
  </channel>
</rss>

