<?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 missing simple renderer/resources in local api build using bower/dojo in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/missing-simple-renderer-resources-in-local-api/m-p/198509#M18412</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Summary: specific feature layer/simple renderer will work using the&amp;nbsp;esri-hosted version of the api but not using local copy (all other feature layers work)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To replicate the issue, go to&amp;nbsp;&lt;A href="https://dojo-arcmap.byu.edu/"&gt;https://dojo-arcmap.byu.edu/&lt;/A&gt;&amp;nbsp;then More &amp;gt; AED Locations, view the console error, then try the same steps using the&amp;nbsp;esri-hosted api&amp;nbsp;&lt;A href="https://arcmap.byu.edu/"&gt;https://arcmap.byu.edu/&lt;/A&gt;&amp;nbsp;to see it work there&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error listed says "Uncaught (in promise) TypeError: i.getSymbol is not a function" the files referenced are not helpful in identifying the error as variables are fairly ambiguous but on the surface it seems like an issue with rendering the symbol for the featureLayer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought it may be the aed.png for the simplerenderer is referenced in the wrong location, but put in a black simple-marker dot does not solve the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has someone had a similar error? Is this an issue with the build profile someone can identify for me? Any insight would be greatly appreciated. I'll attach the full main.js and the build profile&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the relevant code for the featurelayer:&lt;/P&gt;&lt;P&gt;function toggleAEDs() {&lt;BR /&gt; removeLayers();&lt;BR /&gt; require([&lt;BR /&gt; "esri/request",&lt;BR /&gt; "esri/geometry/Point",&lt;BR /&gt; "esri/widgets/Legend",&lt;BR /&gt; "esri/config",&lt;BR /&gt; "esri/renderers/SimpleRenderer",&lt;BR /&gt; "dojo/domReady!"&lt;BR /&gt; ], function(esriRequest, Point, Legend, esriConfig, SimpleRenderer) {&lt;BR /&gt;&lt;SPAN&gt; var aedurl = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Frisk.byu.edu%2Fws%2Faedfeed.php" rel="nofollow" target="_blank"&gt;https://risk.byu.edu/ws/aedfeed.php&lt;/A&gt;&lt;SPAN&gt;";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; esriConfig.request.corsEnabledServers.push("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Frisk.byu.edu%2F" rel="nofollow" target="_blank"&gt;https://risk.byu.edu/&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;BR /&gt; getData().then(createGraphics). // then send it to the createGraphics() method&lt;BR /&gt; then(createLayer). // when graphics are created, create the layer&lt;BR /&gt; otherwise(errback);&lt;BR /&gt; //attempt to access the aedlive feed. if not, return the local aedfeed.json&lt;BR /&gt; function getData() {&lt;BR /&gt; return esriRequest(aedurl).then(function(response) {&lt;BR /&gt; //console.log(response);&lt;BR /&gt; return response;&lt;BR /&gt; }).otherwise(function(error) {&lt;BR /&gt; console.log('request failed, grabbing local feed');&lt;BR /&gt; return esriRequest("scripts/aedfeed.json", {responseType: "json"});&lt;BR /&gt; });&lt;BR /&gt; }&lt;BR /&gt; function createGraphics(response) {&lt;BR /&gt; // raw GeoJSON data&lt;BR /&gt; var geoJson = response.data;&lt;BR /&gt; // Create an array of Graphics from each GeoJSON feature&lt;BR /&gt; return geoJson.features.map(function(feature, i) {&lt;BR /&gt; return {&lt;BR /&gt; geometry: new Point({x: feature.geometry.coordinates[0], y: feature.geometry.coordinates[1]}),&lt;BR /&gt; // select only the attributes you care about&lt;BR /&gt; attributes: {&lt;BR /&gt; ObjectID: i,&lt;BR /&gt; building: feature.properties.building,&lt;BR /&gt; room: feature.properties.room,&lt;BR /&gt; location: feature.properties.location,&lt;BR /&gt; picture: feature.properties.picture&lt;BR /&gt; }&lt;BR /&gt; };&lt;BR /&gt; });&lt;BR /&gt; }&lt;BR /&gt; function createLayer(graphics) {&lt;/P&gt;&lt;P&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: "building",&lt;BR /&gt; alias: "building",&lt;BR /&gt; type: "string"&lt;BR /&gt; }, {&lt;BR /&gt; name: "room",&lt;BR /&gt; alias: "room",&lt;BR /&gt; type: "string"&lt;BR /&gt; }, {&lt;BR /&gt; name: "location",&lt;BR /&gt; alias: "location",&lt;BR /&gt; type: "string"&lt;BR /&gt; }, {&lt;BR /&gt; name: "picture",&lt;BR /&gt; alias: "picture",&lt;BR /&gt; type: "string"&lt;BR /&gt; }&lt;BR /&gt; ];&lt;BR /&gt; var template = {&lt;BR /&gt; title: "AED #{ObjectID}",&lt;BR /&gt; content: "&amp;lt;img src='{picture}' height='320' width='240'/&amp;gt;&amp;lt;div class='popupText'&amp;gt;{building} room {room} {location} &amp;lt;/div&amp;gt;"&lt;BR /&gt; };&lt;BR /&gt; var featureLayer = new FeatureLayer({&lt;BR /&gt; source: graphics, // autocast as an array of esri/Graphic&lt;BR /&gt; // create an instance of esri/layers/support/Field for each field object&lt;BR /&gt; fields: fields, // This is required when creating a layer from Graphics&lt;BR /&gt; objectIdField: "ObjectID", // This must be defined when creating a layer from Graphics&lt;BR /&gt; renderer: {&lt;BR /&gt; type: "simple", // autocasts as new SimpleRenderer()&lt;BR /&gt; symbol: {&lt;BR /&gt; type: "picture-marker", // autocasts as new SimpleMarkerSymbol()&lt;BR /&gt; url: "aed.png",&lt;BR /&gt; width: "30px",&lt;BR /&gt; height: "56px"&lt;BR /&gt; }&lt;BR /&gt; },&lt;BR /&gt; spatialReference: {&lt;BR /&gt; wkid: 4326&lt;BR /&gt; },&lt;BR /&gt; popupTemplate: template,&lt;BR /&gt; geometryType: "point", // Must be set when creating a layer from Graphics&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;map.add(featureLayer);&lt;BR /&gt; featureLayerIDSet.push(featureLayer.id);&lt;BR /&gt; return featureLayer;&lt;BR /&gt; }&lt;BR /&gt; function createLegend(layer) {}&lt;BR /&gt; function errback(error) {&lt;BR /&gt; console.error("Creating failed. ", error);&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Jan 2018 22:34:39 GMT</pubDate>
    <dc:creator>deleted-user-NafuMc_hs6Px</dc:creator>
    <dc:date>2018-01-09T22:34:39Z</dc:date>
    <item>
      <title>missing simple renderer/resources in local api build using bower/dojo</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/missing-simple-renderer-resources-in-local-api/m-p/198509#M18412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Summary: specific feature layer/simple renderer will work using the&amp;nbsp;esri-hosted version of the api but not using local copy (all other feature layers work)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To replicate the issue, go to&amp;nbsp;&lt;A href="https://dojo-arcmap.byu.edu/"&gt;https://dojo-arcmap.byu.edu/&lt;/A&gt;&amp;nbsp;then More &amp;gt; AED Locations, view the console error, then try the same steps using the&amp;nbsp;esri-hosted api&amp;nbsp;&lt;A href="https://arcmap.byu.edu/"&gt;https://arcmap.byu.edu/&lt;/A&gt;&amp;nbsp;to see it work there&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error listed says "Uncaught (in promise) TypeError: i.getSymbol is not a function" the files referenced are not helpful in identifying the error as variables are fairly ambiguous but on the surface it seems like an issue with rendering the symbol for the featureLayer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought it may be the aed.png for the simplerenderer is referenced in the wrong location, but put in a black simple-marker dot does not solve the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has someone had a similar error? Is this an issue with the build profile someone can identify for me? Any insight would be greatly appreciated. I'll attach the full main.js and the build profile&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the relevant code for the featurelayer:&lt;/P&gt;&lt;P&gt;function toggleAEDs() {&lt;BR /&gt; removeLayers();&lt;BR /&gt; require([&lt;BR /&gt; "esri/request",&lt;BR /&gt; "esri/geometry/Point",&lt;BR /&gt; "esri/widgets/Legend",&lt;BR /&gt; "esri/config",&lt;BR /&gt; "esri/renderers/SimpleRenderer",&lt;BR /&gt; "dojo/domReady!"&lt;BR /&gt; ], function(esriRequest, Point, Legend, esriConfig, SimpleRenderer) {&lt;BR /&gt;&lt;SPAN&gt; var aedurl = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Frisk.byu.edu%2Fws%2Faedfeed.php" rel="nofollow" target="_blank"&gt;https://risk.byu.edu/ws/aedfeed.php&lt;/A&gt;&lt;SPAN&gt;";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; esriConfig.request.corsEnabledServers.push("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Frisk.byu.edu%2F" rel="nofollow" target="_blank"&gt;https://risk.byu.edu/&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;BR /&gt; getData().then(createGraphics). // then send it to the createGraphics() method&lt;BR /&gt; then(createLayer). // when graphics are created, create the layer&lt;BR /&gt; otherwise(errback);&lt;BR /&gt; //attempt to access the aedlive feed. if not, return the local aedfeed.json&lt;BR /&gt; function getData() {&lt;BR /&gt; return esriRequest(aedurl).then(function(response) {&lt;BR /&gt; //console.log(response);&lt;BR /&gt; return response;&lt;BR /&gt; }).otherwise(function(error) {&lt;BR /&gt; console.log('request failed, grabbing local feed');&lt;BR /&gt; return esriRequest("scripts/aedfeed.json", {responseType: "json"});&lt;BR /&gt; });&lt;BR /&gt; }&lt;BR /&gt; function createGraphics(response) {&lt;BR /&gt; // raw GeoJSON data&lt;BR /&gt; var geoJson = response.data;&lt;BR /&gt; // Create an array of Graphics from each GeoJSON feature&lt;BR /&gt; return geoJson.features.map(function(feature, i) {&lt;BR /&gt; return {&lt;BR /&gt; geometry: new Point({x: feature.geometry.coordinates[0], y: feature.geometry.coordinates[1]}),&lt;BR /&gt; // select only the attributes you care about&lt;BR /&gt; attributes: {&lt;BR /&gt; ObjectID: i,&lt;BR /&gt; building: feature.properties.building,&lt;BR /&gt; room: feature.properties.room,&lt;BR /&gt; location: feature.properties.location,&lt;BR /&gt; picture: feature.properties.picture&lt;BR /&gt; }&lt;BR /&gt; };&lt;BR /&gt; });&lt;BR /&gt; }&lt;BR /&gt; function createLayer(graphics) {&lt;/P&gt;&lt;P&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: "building",&lt;BR /&gt; alias: "building",&lt;BR /&gt; type: "string"&lt;BR /&gt; }, {&lt;BR /&gt; name: "room",&lt;BR /&gt; alias: "room",&lt;BR /&gt; type: "string"&lt;BR /&gt; }, {&lt;BR /&gt; name: "location",&lt;BR /&gt; alias: "location",&lt;BR /&gt; type: "string"&lt;BR /&gt; }, {&lt;BR /&gt; name: "picture",&lt;BR /&gt; alias: "picture",&lt;BR /&gt; type: "string"&lt;BR /&gt; }&lt;BR /&gt; ];&lt;BR /&gt; var template = {&lt;BR /&gt; title: "AED #{ObjectID}",&lt;BR /&gt; content: "&amp;lt;img src='{picture}' height='320' width='240'/&amp;gt;&amp;lt;div class='popupText'&amp;gt;{building} room {room} {location} &amp;lt;/div&amp;gt;"&lt;BR /&gt; };&lt;BR /&gt; var featureLayer = new FeatureLayer({&lt;BR /&gt; source: graphics, // autocast as an array of esri/Graphic&lt;BR /&gt; // create an instance of esri/layers/support/Field for each field object&lt;BR /&gt; fields: fields, // This is required when creating a layer from Graphics&lt;BR /&gt; objectIdField: "ObjectID", // This must be defined when creating a layer from Graphics&lt;BR /&gt; renderer: {&lt;BR /&gt; type: "simple", // autocasts as new SimpleRenderer()&lt;BR /&gt; symbol: {&lt;BR /&gt; type: "picture-marker", // autocasts as new SimpleMarkerSymbol()&lt;BR /&gt; url: "aed.png",&lt;BR /&gt; width: "30px",&lt;BR /&gt; height: "56px"&lt;BR /&gt; }&lt;BR /&gt; },&lt;BR /&gt; spatialReference: {&lt;BR /&gt; wkid: 4326&lt;BR /&gt; },&lt;BR /&gt; popupTemplate: template,&lt;BR /&gt; geometryType: "point", // Must be set when creating a layer from Graphics&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;map.add(featureLayer);&lt;BR /&gt; featureLayerIDSet.push(featureLayer.id);&lt;BR /&gt; return featureLayer;&lt;BR /&gt; }&lt;BR /&gt; function createLegend(layer) {}&lt;BR /&gt; function errback(error) {&lt;BR /&gt; console.error("Creating failed. ", error);&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2018 22:34:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/missing-simple-renderer-resources-in-local-api/m-p/198509#M18412</guid>
      <dc:creator>deleted-user-NafuMc_hs6Px</dc:creator>
      <dc:date>2018-01-09T22:34:39Z</dc:date>
    </item>
  </channel>
</rss>

