<?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 renderingInfo in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/renderinginfo/m-p/587523#M54885</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I&amp;nbsp;would like to&amp;nbsp;display a map from data self-generated but I have the following javascript error :&amp;nbsp;&lt;STRONG&gt;TypeError: this.renderingInfo.symbol is null&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here my complete code :&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;require([&lt;BR /&gt; "esri/views/MapView",&lt;BR /&gt; "esri/Map",&lt;BR /&gt; "esri/layers/FeatureLayer",&lt;BR /&gt; "esri/layers/support/Field",&lt;BR /&gt; "esri/geometry/Point",&lt;BR /&gt; "esri/renderers/UniqueValueRenderer",&lt;BR /&gt; "esri/symbols/SimpleMarkerSymbol",&lt;BR /&gt; "esri/widgets/Legend",&lt;BR /&gt; "esri/request",&lt;BR /&gt; &lt;BR /&gt; "dojo/_base/array",&lt;BR /&gt; "dojo/dom",&lt;BR /&gt; "dojo/on",&lt;BR /&gt; "dojo/domReady!"&lt;BR /&gt; ], function(MapView, Map, FeatureLayer, Field, Point,&lt;BR /&gt; UniqueValueRenderer, SimpleMarkerSymbol, Legend, esriRequest,&lt;BR /&gt; arrayUtils, dom, on&lt;BR /&gt; ){&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; // Création de la couche de points&lt;BR /&gt; var fields = [&lt;BR /&gt; {&lt;BR /&gt; name: "ObjectID",&lt;BR /&gt; alias: "ObjectID",&lt;BR /&gt; type: "oid"&lt;BR /&gt; },{&lt;BR /&gt; name: "lemme",&lt;BR /&gt; alias: "lemme",&lt;BR /&gt; type: "string"&lt;BR /&gt; },{&lt;BR /&gt; name: "formePhonique",&lt;BR /&gt; alias: "formePhonique",&lt;BR /&gt; type: "string"&lt;BR /&gt; },{&lt;BR /&gt; name: "commune",&lt;BR /&gt; alias: "commune",&lt;BR /&gt; type: "string"&lt;BR /&gt; }, ,{&lt;BR /&gt; name: "question",&lt;BR /&gt; alias: "question",&lt;BR /&gt; type: "string"&lt;BR /&gt; }&lt;BR /&gt; ];&lt;/P&gt;&lt;P&gt;var pTemplate = {&lt;BR /&gt; title: "{question}",&lt;BR /&gt; content: [{&lt;BR /&gt; type: "fields",&lt;BR /&gt; fieldInfos: [{&lt;BR /&gt; fieldName: "lemme",&lt;BR /&gt; label: "Lemme",&lt;BR /&gt; visible: true&lt;BR /&gt; }, {&lt;BR /&gt; fieldName: "formePhonique",&lt;BR /&gt; label: "Forme phonique",&lt;BR /&gt; visible: true&lt;BR /&gt; }, {&lt;BR /&gt; fieldName: "commune",&lt;BR /&gt; label: "Commune",&lt;BR /&gt; visible: true&lt;BR /&gt; }]&lt;BR /&gt; }]&lt;BR /&gt; };&lt;BR /&gt; &lt;BR /&gt; var features = [{geometry: new Point({&lt;BR /&gt; x: 9.123337,&lt;BR /&gt; y: 42.474312,&lt;BR /&gt; }),&lt;BR /&gt; attributes: {&lt;BR /&gt; ObjectID: 7885,&lt;BR /&gt; lemme: "tumbà",&lt;BR /&gt; formePhonique: "tumb'a",&lt;BR /&gt; commune: "Moltifao",&lt;BR /&gt; question: "'tuer' (le cochon)"&lt;BR /&gt; }&lt;BR /&gt; },&lt;BR /&gt; .....&lt;BR /&gt; ];&lt;BR /&gt; var map = new Map({&lt;BR /&gt; basemap: "gray"&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;var view = new MapView({&lt;BR /&gt; container: "viewDiv", // Reference to the DOM node that will contain the view&lt;BR /&gt; center: [9.15892639, 42.183238],&lt;BR /&gt; zoom: 9,&lt;BR /&gt; map: map // References the map object created in step 3&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;var tumbà = new SimpleMarkerSymbol({&lt;BR /&gt; color: getRandomColor(),&lt;BR /&gt; width: 10,&lt;BR /&gt; style: "solid"&lt;BR /&gt; });&lt;BR /&gt;var pulsà = new SimpleMarkerSymbol({&lt;BR /&gt; color: getRandomColor(),&lt;BR /&gt; width: 10,&lt;BR /&gt; style: "solid"&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;var defaultSymb = new SimpleMarkerSymbol({&lt;BR /&gt; color: "#123456",&lt;BR /&gt; width: 10,&lt;BR /&gt; style: "solid"&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; var myrenderer = new UniqueValueRenderer({&lt;BR /&gt; defaultSymbol: defaultSymb,&lt;BR /&gt; defaultLabel: "Other major roads",&lt;BR /&gt; field: "lemme",&lt;BR /&gt; visualVariables: [&lt;BR /&gt; {&lt;BR /&gt; type: "size",&lt;BR /&gt; field: "lemme"&lt;BR /&gt; }], &lt;BR /&gt; uniqueValueInfos: [&lt;BR /&gt; {&lt;BR /&gt; value: "tumbà", // code for interstates/freeways&lt;BR /&gt; symbol: tumbà,&lt;BR /&gt; label: "tumbà"&lt;BR /&gt; },&lt;BR /&gt; ....&lt;BR /&gt; ]&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;var lyr = new FeatureLayer({&lt;BR /&gt; source: features,&lt;BR /&gt; fields: fields,&lt;BR /&gt; objectIdField: "ObjectID",&lt;BR /&gt; geometryType: "point",&lt;BR /&gt; renderer: myrenderer,&lt;BR /&gt; spatialReference: {&lt;BR /&gt; wkid: 4326&lt;BR /&gt; },&lt;BR /&gt; popupTemplate: pTemplate&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;var legend = new Legend({&lt;BR /&gt; view: view,&lt;BR /&gt; layerInfos: [{&lt;BR /&gt; layer: lyr,&lt;BR /&gt; title: "'tuer' (le cochon)"&lt;BR /&gt; }]&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; map.add(lyr);&lt;BR /&gt; view.graphics.add([lyr]);&lt;/P&gt;&lt;P&gt;view.ui.add(legend, "bottom-left");&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Jul 2017 14:25:03 GMT</pubDate>
    <dc:creator>GueniotFlorian</dc:creator>
    <dc:date>2017-07-04T14:25:03Z</dc:date>
    <item>
      <title>renderingInfo</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/renderinginfo/m-p/587523#M54885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I&amp;nbsp;would like to&amp;nbsp;display a map from data self-generated but I have the following javascript error :&amp;nbsp;&lt;STRONG&gt;TypeError: this.renderingInfo.symbol is null&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here my complete code :&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;require([&lt;BR /&gt; "esri/views/MapView",&lt;BR /&gt; "esri/Map",&lt;BR /&gt; "esri/layers/FeatureLayer",&lt;BR /&gt; "esri/layers/support/Field",&lt;BR /&gt; "esri/geometry/Point",&lt;BR /&gt; "esri/renderers/UniqueValueRenderer",&lt;BR /&gt; "esri/symbols/SimpleMarkerSymbol",&lt;BR /&gt; "esri/widgets/Legend",&lt;BR /&gt; "esri/request",&lt;BR /&gt; &lt;BR /&gt; "dojo/_base/array",&lt;BR /&gt; "dojo/dom",&lt;BR /&gt; "dojo/on",&lt;BR /&gt; "dojo/domReady!"&lt;BR /&gt; ], function(MapView, Map, FeatureLayer, Field, Point,&lt;BR /&gt; UniqueValueRenderer, SimpleMarkerSymbol, Legend, esriRequest,&lt;BR /&gt; arrayUtils, dom, on&lt;BR /&gt; ){&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; // Création de la couche de points&lt;BR /&gt; var fields = [&lt;BR /&gt; {&lt;BR /&gt; name: "ObjectID",&lt;BR /&gt; alias: "ObjectID",&lt;BR /&gt; type: "oid"&lt;BR /&gt; },{&lt;BR /&gt; name: "lemme",&lt;BR /&gt; alias: "lemme",&lt;BR /&gt; type: "string"&lt;BR /&gt; },{&lt;BR /&gt; name: "formePhonique",&lt;BR /&gt; alias: "formePhonique",&lt;BR /&gt; type: "string"&lt;BR /&gt; },{&lt;BR /&gt; name: "commune",&lt;BR /&gt; alias: "commune",&lt;BR /&gt; type: "string"&lt;BR /&gt; }, ,{&lt;BR /&gt; name: "question",&lt;BR /&gt; alias: "question",&lt;BR /&gt; type: "string"&lt;BR /&gt; }&lt;BR /&gt; ];&lt;/P&gt;&lt;P&gt;var pTemplate = {&lt;BR /&gt; title: "{question}",&lt;BR /&gt; content: [{&lt;BR /&gt; type: "fields",&lt;BR /&gt; fieldInfos: [{&lt;BR /&gt; fieldName: "lemme",&lt;BR /&gt; label: "Lemme",&lt;BR /&gt; visible: true&lt;BR /&gt; }, {&lt;BR /&gt; fieldName: "formePhonique",&lt;BR /&gt; label: "Forme phonique",&lt;BR /&gt; visible: true&lt;BR /&gt; }, {&lt;BR /&gt; fieldName: "commune",&lt;BR /&gt; label: "Commune",&lt;BR /&gt; visible: true&lt;BR /&gt; }]&lt;BR /&gt; }]&lt;BR /&gt; };&lt;BR /&gt; &lt;BR /&gt; var features = [{geometry: new Point({&lt;BR /&gt; x: 9.123337,&lt;BR /&gt; y: 42.474312,&lt;BR /&gt; }),&lt;BR /&gt; attributes: {&lt;BR /&gt; ObjectID: 7885,&lt;BR /&gt; lemme: "tumbà",&lt;BR /&gt; formePhonique: "tumb'a",&lt;BR /&gt; commune: "Moltifao",&lt;BR /&gt; question: "'tuer' (le cochon)"&lt;BR /&gt; }&lt;BR /&gt; },&lt;BR /&gt; .....&lt;BR /&gt; ];&lt;BR /&gt; var map = new Map({&lt;BR /&gt; basemap: "gray"&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;var view = new MapView({&lt;BR /&gt; container: "viewDiv", // Reference to the DOM node that will contain the view&lt;BR /&gt; center: [9.15892639, 42.183238],&lt;BR /&gt; zoom: 9,&lt;BR /&gt; map: map // References the map object created in step 3&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;var tumbà = new SimpleMarkerSymbol({&lt;BR /&gt; color: getRandomColor(),&lt;BR /&gt; width: 10,&lt;BR /&gt; style: "solid"&lt;BR /&gt; });&lt;BR /&gt;var pulsà = new SimpleMarkerSymbol({&lt;BR /&gt; color: getRandomColor(),&lt;BR /&gt; width: 10,&lt;BR /&gt; style: "solid"&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;var defaultSymb = new SimpleMarkerSymbol({&lt;BR /&gt; color: "#123456",&lt;BR /&gt; width: 10,&lt;BR /&gt; style: "solid"&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; var myrenderer = new UniqueValueRenderer({&lt;BR /&gt; defaultSymbol: defaultSymb,&lt;BR /&gt; defaultLabel: "Other major roads",&lt;BR /&gt; field: "lemme",&lt;BR /&gt; visualVariables: [&lt;BR /&gt; {&lt;BR /&gt; type: "size",&lt;BR /&gt; field: "lemme"&lt;BR /&gt; }], &lt;BR /&gt; uniqueValueInfos: [&lt;BR /&gt; {&lt;BR /&gt; value: "tumbà", // code for interstates/freeways&lt;BR /&gt; symbol: tumbà,&lt;BR /&gt; label: "tumbà"&lt;BR /&gt; },&lt;BR /&gt; ....&lt;BR /&gt; ]&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;var lyr = new FeatureLayer({&lt;BR /&gt; source: features,&lt;BR /&gt; fields: fields,&lt;BR /&gt; objectIdField: "ObjectID",&lt;BR /&gt; geometryType: "point",&lt;BR /&gt; renderer: myrenderer,&lt;BR /&gt; spatialReference: {&lt;BR /&gt; wkid: 4326&lt;BR /&gt; },&lt;BR /&gt; popupTemplate: pTemplate&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;var legend = new Legend({&lt;BR /&gt; view: view,&lt;BR /&gt; layerInfos: [{&lt;BR /&gt; layer: lyr,&lt;BR /&gt; title: "'tuer' (le cochon)"&lt;BR /&gt; }]&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; map.add(lyr);&lt;BR /&gt; view.graphics.add([lyr]);&lt;/P&gt;&lt;P&gt;view.ui.add(legend, "bottom-left");&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jul 2017 14:25:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/renderinginfo/m-p/587523#M54885</guid>
      <dc:creator>GueniotFlorian</dc:creator>
      <dc:date>2017-07-04T14:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: renderingInfo</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/renderinginfo/m-p/587524#M54886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I solved my problem by deleting the following line:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;view.graphics.add([lyr]);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jul 2017 13:39:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/renderinginfo/m-p/587524#M54886</guid>
      <dc:creator>GueniotFlorian</dc:creator>
      <dc:date>2017-07-05T13:39:04Z</dc:date>
    </item>
  </channel>
</rss>

