<?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: Map not loading graphics layer in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/map-not-loading-graphics-layer/m-p/399841#M2634</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does your console give you any errors?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you also post your require and function, to see if you load the modules you need?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Jul 2015 12:52:46 GMT</pubDate>
    <dc:creator>TimWitt2</dc:creator>
    <dc:date>2015-07-23T12:52:46Z</dc:date>
    <item>
      <title>Map not loading graphics layer</title>
      <link>https://community.esri.com/t5/developers-questions/map-not-loading-graphics-layer/m-p/399840#M2633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am having unexpected trouble getting my map to display a graphics layer created in the program. It displays a feature layer correctly, and I don't understand why it won't display with graphics layer. I've done extensive console logging: the "layer-add-result" event fires without error and the object contains the correct layer. However, the map object has the same layers and graphics before and after the layer addition (only default layer). There is no change to the map object, but no error either. The graphics layer has the correct features (obtained from a feature set from a query, if that matters). Here's a little of my code (cityArray is an array of arrays, where each sub array has all features in the same city):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="im" style="color: #500050; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var cityDisplay = new GraphicsLayer();
for(var idx = 0; idx &amp;lt; cityArray.length; idx++){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var g = new Graphic(cityArray[idx][0].geometry, null, {numOfEvents: cityArray[idx].length, Events: cityArray[idx]});
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cityDisplay.add(g);
}
var symbol = new SimpleMarkerSymbol();
symbol.setColor(new Color([150, 150, 150, 0.5]));
var renderer = new ClassBreaksRenderer(symbol, "numOfEvents");
renderer.addBreak(0, 3, new SimpleMarkerSymbol().setColor(new Color([56, 168, 0, 0.5])));
renderer.addBreak(3, 25, new SimpleMarkerSymbol().setColor(new Color([139, 209, 0, 0.5])));
renderer.addBreak(25, 50, new SimpleMarkerSymbol().setColor(new Color([255, 255, 0, 0.5])));
renderer.addBreak(50, 100, new SimpleMarkerSymbol().setColor(new Color([255, 128, 0, 0.5])));
renderer.addBreak(100, Infinity, new SimpleMarkerSymbol().setColor(new Color([255, 0, 0, 0.5])));
cityDisplay.setRenderer(renderer);
map.on("layer-add-result", function(err){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(err);
});
map.addLayer(cityDisplay);&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:15:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/map-not-loading-graphics-layer/m-p/399840#M2633</guid>
      <dc:creator>NicolasPeckman</dc:creator>
      <dc:date>2021-12-11T18:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: Map not loading graphics layer</title>
      <link>https://community.esri.com/t5/developers-questions/map-not-loading-graphics-layer/m-p/399841#M2634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does your console give you any errors?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you also post your require and function, to see if you load the modules you need?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 12:52:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/map-not-loading-graphics-layer/m-p/399841#M2634</guid>
      <dc:creator>TimWitt2</dc:creator>
      <dc:date>2015-07-23T12:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Map not loading graphics layer</title>
      <link>https://community.esri.com/t5/developers-questions/map-not-loading-graphics-layer/m-p/399842#M2635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have received no errors whatsoever. Here is my require and function (its in a custom widget):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;define([
"dojo/_base/declare", "dojo/dom", "dojo/dom-construct", "dojo/on", "dojo/parser", "dojo/date/stamp",
"esri/lang", "esri/layers/FeatureLayer", "esri/layers/CSVLayer", "esri/layers/GraphicsLayer", "esri/graphic", "esri/Color",
"esri/symbols/SimpleMarkerSymbol", "esri/renderers/ClassBreaksRenderer", "esri/dijit/Search", "esri/tasks/query",
"dijit/popup", "dijit/layout/ContentPane", "dijit/form/Form", "dijit/form/Button", "dijit/form/TextBox", "dijit/form/NumberTextBox", "dijit/form/DateTextBox", "dijit/form/Select",
"dijit/_WidgetBase", "dijit/_TemplatedMixin", "dojo/text!./HonorsForm.html", "dojo/domReady!"
], function(declare, dom, domConstruct, on, parser, Stamp, esriLang, FeatureLayer, CSVLayer, GraphicsLayer, Graphic, Color, SimpleMarkerSymbol, ClassBreaksRenderer, Search, Query, popup, 
ContentPane, Form, Button, TextBox, NumberTextBox, DateTextBox, Select,
_WidgetBase, _TemplatedMixin, template){&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:15:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/map-not-loading-graphics-layer/m-p/399842#M2635</guid>
      <dc:creator>NicolasPeckman</dc:creator>
      <dc:date>2021-12-11T18:15:42Z</dc:date>
    </item>
  </channel>
</rss>

