<?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 Change point styles in Api for JavaScript - web apps in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-point-styles-in-api-for-javascript-web-apps/m-p/1036387#M72056</link>
    <description>&lt;P&gt;Hello ESRI community,&lt;/P&gt;&lt;P&gt;I need help with a problem I am having using the ArcGIS API for JavaScript - v18. Well the problem is that I want to try to change the points that comes from a cycle-parking API by some images depending on the parking if it is "GOLD" or "SILVER" should place the image that corresponds to it with respect to the VALUE. Then as I am doing it it does not render me the points that I need to change by the images or it shows me the error, my code is the following one:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta charset="utf-8" /&amp;gt;
    &amp;lt;meta
      name="viewport"
      content="initial-scale=1, maximum-scale=1, user-scalable=no"
    /&amp;gt;
    &amp;lt;title&amp;gt;Prueba - ArcGIS API for JavaScript&amp;lt;/title&amp;gt;
    &amp;lt;style&amp;gt;
      html,
      body,
      #viewDiv {
        padding: 0;
        margin: 0;
        height: 100%;
        width: 100%;
      }

      #titleDiv {
        position: absolute;
        height: 55px;
        width: 100%;
        display: flex;
        justify-content: space-between;
        color: #f8f8f8;
        background: #464646;
        z-index: 1;
      }

      #title {
        margin: 15px;
        font-size: 20px;
        overflow: hidden;
      }

      .invisible {
        visibility: collapse;
      }

      .esri-expand .esri-expand__content {
        box-shadow: none;
      }

      .esri-view-height-xsmall .esri-ui-corner .esri-expand .esri-legend.esri-widget,
      .esri-view-height-small .esri-ui-corner .esri-expand .esri-legend.esri-widget {
        max-height: 100%;
      }

      .esri-view-width-less-than-small .esri-zoom .esri-widget--button {
        display: none;
      }
    &amp;lt;/style&amp;gt;
    &amp;lt;link
      rel="stylesheet"
      href="https://js.arcgis.com/4.18/esri/themes/light/main.css"
    /&amp;gt;
    &amp;lt;script src="https://js.arcgis.com/4.18/"&amp;gt;&amp;lt;/script&amp;gt;

    &amp;lt;script&amp;gt;
      require([
        "esri/config",
        "esri/Map",
        "esri/views/MapView",
        "esri/widgets/Expand",
        "esri/widgets/Directions",
        "esri/layers/FeatureLayer",
        "dojo/domReady!",
      ], function (esriConfig, Map, MapView, Expand ,Directions,FeatureLayer ) {
        esriConfig.apiKey =
          "AAPKe5cbac65965142caacc4f99e879243a96wQMcjhjr_Mm6589Qkt56_B-AOFWPshBSJKcBcVTLMojNCQSboxBogAduxYsvrDY";
        
  

        var map = new Map({
          basemap: "topo-vector",
        });

       
        var view = new MapView({
          title: document.getElementById("title").innerHTML = "Cicloparqueaderos Certificados Bogota D.C",
          container: "viewDiv",
          map: map,
          center: [-74.093, 4.637],
          zoom: 12,
        });
       

        //Image gold
        const goldImg = {
          type: "picture-marker",
          url: "https://i.ibb.co/5YggNTj/oro.png"
        }
        //Image Silver
        const silverImg = {
          type: "picture-marker",
          url: "https://i.ibb.co/SQhxKHT/plata.png"
        }


        var pointsRenderer = {

        
        type: "unique-value",
            uniqueValueInfos: [
            {
                value: "1",
                symbol: goldImg
            }, {
                value: "2",
                symbol: silverImg
            }
            ] 
        


        };
          


        
        var trailheadsLayer = new FeatureLayer({
          url:
            "https://services2.arcgis.com/NEwhEo9GGSHXcRXV/arcgis/rest/services/Cicloparqueaderos_Certificados_Bogota_D_C/FeatureServer/0",
            
            //Render
            renderer: pointsRenderer,
            outFields: ["*"],

          popupTemplate: {
            title: "Cicloparqueaderos Certificados Bogota D.C {COD_CICP}",
            content: [
              {
                type: "fields", // FieldsContentElement
                fieldInfos: [
                  {
                    fieldName: "COD_CICP",
                    visible: true,
                    label: "Codigo_Cicloparqueadero",
                  },
                  {
                    fieldName: "NOMBRE_CICP",
                    visible: true,
                    label: "Nombre_Cicloparqueadero",
                  },
                  {
                    fieldName: "HORARIO_CICP",
                    visible: true,
                    label: "Horario_CicP",
                  },
                  {
                    fieldName: "DIRECCION",
                    visible: true,
                    label: "DIRECCION",
                  },
                  {
                    fieldName: "LOCALIDAD",
                    visible: true,
                    label: "LOCALIDAD",
                  },
                  {
                    fieldName: "CUPOS",
                    visible: true,
                    label: "Cupos_Bici",
                  },
                  {
                    fieldName: "TIPOLOGIA_CICP",
                    visible: true,
                    label: "Tipologia_Cicloparqueadero",
                  },
                  {
                    fieldName: "SELLO",
                    visible: true,
                    label: "SELLO_TIPO",
                  },
                ],
              },
            ],
          },
        });
    

        map.add(trailheadsLayer);
        

        var directionsWidget = new Directions({
          view: view,

          // Apunte la URL a un servicio de ruta válido que utilice un
          // Proxy de servicio alojado de ArcGIS Online en lugar del servicio predeterminado
          routeServiceUrl:
            "https://utility.arcgis.com/usrsvcs/appservices/srsKxBIxJZB0pTZ0/rest/services/World/Route/NAServer/Route_World",
          container: document.createElement("div")
        });

        var directionsExpand = new Expand({
        view: view,
        content: new Directions({
            view: view,
            routeServiceUrl:
            "https://utility.arcgis.com/usrsvcs/appservices/srsKxBIxJZB0pTZ0/rest/services/World/Route/NAServer/Route_World",
            container: document.createElement("div")
          })
        });
        // Load

        isResponsiveSize = view.widthBreakpoint === "xsmall";
        updateView(isResponsiveSize);

        // Breakpoints

        view.watch("widthBreakpoint", function(breakpoint) {
          switch (breakpoint) {
            case "xsmall":
              updateView(true);
              break;
            case "small":
            case "medium":
            case "large":
            case "xlarge":
              updateView(false);
              break;
            default:
          }
        });

        function updateView(isMobile) {
          setTitleMobile(isMobile);
          setLegendMobile(isMobile);
        }

        function setTitleMobile(isMobile) {
          if (isMobile) {
            document.querySelector("#titleDiv").classList.add("invisible");
            view.padding = {
              top: 0
            };
          } else {
            document.querySelector("#titleDiv").classList.remove("invisible");
            view.padding = {
              top: 55
            };
          }
        }
        function setLegendMobile(isMobile) {
          var toAdd = isMobile ? directionsExpand : directionsWidget;
          var toRemove = isMobile ? directionsWidget : directionsExpand;

          view.ui.remove(toRemove);
          view.ui.add(toAdd, "top-right");
        }

        // Agrega el widget Indicaciones en la esquina superior derecha de la vista
        // view.ui.add(directionsExpand, {
        //   position: "top-right",
        // });
      });
    &amp;lt;/script&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;div id="titleDiv" class="esri-widget"&amp;gt;&amp;lt;div id="title"&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;
    &amp;lt;div id="viewDiv"&amp;gt;&amp;lt;/div&amp;gt;
    &amp;lt;div id="instruction" class="esri-widget"&amp;gt;
      Haga clic en cualquier ubicación en el mapa para ver su dirección postal
    &amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The points I want to change for the images are these:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EdissonGabrielLópezSalamanca_0-1615760085142.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/8412iAA779EA5211AA2A5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="EdissonGabrielLópezSalamanca_0-1615760085142.png" alt="EdissonGabrielLópezSalamanca_0-1615760085142.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;link api (&lt;A href="https://services2.arcgis.com/NEwhEo9GGSHXcRXV/arcgis/rest/services/Cicloparqueaderos_Certificados_Bogota_D_C/FeatureServer/0" target="_blank"&gt;https://services2.arcgis.com/NEwhEo9GGSHXcRXV/arcgis/rest/services/Cicloparqueaderos_Certificados_Bogota_D_C/FeatureServer/0&lt;/A&gt;?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope you can help me, thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Sun, 14 Mar 2021 22:18:08 GMT</pubDate>
    <dc:creator>EdissonGabrielLópezSalamanca</dc:creator>
    <dc:date>2021-03-14T22:18:08Z</dc:date>
    <item>
      <title>Change point styles in Api for JavaScript - web apps</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-point-styles-in-api-for-javascript-web-apps/m-p/1036387#M72056</link>
      <description>&lt;P&gt;Hello ESRI community,&lt;/P&gt;&lt;P&gt;I need help with a problem I am having using the ArcGIS API for JavaScript - v18. Well the problem is that I want to try to change the points that comes from a cycle-parking API by some images depending on the parking if it is "GOLD" or "SILVER" should place the image that corresponds to it with respect to the VALUE. Then as I am doing it it does not render me the points that I need to change by the images or it shows me the error, my code is the following one:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta charset="utf-8" /&amp;gt;
    &amp;lt;meta
      name="viewport"
      content="initial-scale=1, maximum-scale=1, user-scalable=no"
    /&amp;gt;
    &amp;lt;title&amp;gt;Prueba - ArcGIS API for JavaScript&amp;lt;/title&amp;gt;
    &amp;lt;style&amp;gt;
      html,
      body,
      #viewDiv {
        padding: 0;
        margin: 0;
        height: 100%;
        width: 100%;
      }

      #titleDiv {
        position: absolute;
        height: 55px;
        width: 100%;
        display: flex;
        justify-content: space-between;
        color: #f8f8f8;
        background: #464646;
        z-index: 1;
      }

      #title {
        margin: 15px;
        font-size: 20px;
        overflow: hidden;
      }

      .invisible {
        visibility: collapse;
      }

      .esri-expand .esri-expand__content {
        box-shadow: none;
      }

      .esri-view-height-xsmall .esri-ui-corner .esri-expand .esri-legend.esri-widget,
      .esri-view-height-small .esri-ui-corner .esri-expand .esri-legend.esri-widget {
        max-height: 100%;
      }

      .esri-view-width-less-than-small .esri-zoom .esri-widget--button {
        display: none;
      }
    &amp;lt;/style&amp;gt;
    &amp;lt;link
      rel="stylesheet"
      href="https://js.arcgis.com/4.18/esri/themes/light/main.css"
    /&amp;gt;
    &amp;lt;script src="https://js.arcgis.com/4.18/"&amp;gt;&amp;lt;/script&amp;gt;

    &amp;lt;script&amp;gt;
      require([
        "esri/config",
        "esri/Map",
        "esri/views/MapView",
        "esri/widgets/Expand",
        "esri/widgets/Directions",
        "esri/layers/FeatureLayer",
        "dojo/domReady!",
      ], function (esriConfig, Map, MapView, Expand ,Directions,FeatureLayer ) {
        esriConfig.apiKey =
          "AAPKe5cbac65965142caacc4f99e879243a96wQMcjhjr_Mm6589Qkt56_B-AOFWPshBSJKcBcVTLMojNCQSboxBogAduxYsvrDY";
        
  

        var map = new Map({
          basemap: "topo-vector",
        });

       
        var view = new MapView({
          title: document.getElementById("title").innerHTML = "Cicloparqueaderos Certificados Bogota D.C",
          container: "viewDiv",
          map: map,
          center: [-74.093, 4.637],
          zoom: 12,
        });
       

        //Image gold
        const goldImg = {
          type: "picture-marker",
          url: "https://i.ibb.co/5YggNTj/oro.png"
        }
        //Image Silver
        const silverImg = {
          type: "picture-marker",
          url: "https://i.ibb.co/SQhxKHT/plata.png"
        }


        var pointsRenderer = {

        
        type: "unique-value",
            uniqueValueInfos: [
            {
                value: "1",
                symbol: goldImg
            }, {
                value: "2",
                symbol: silverImg
            }
            ] 
        


        };
          


        
        var trailheadsLayer = new FeatureLayer({
          url:
            "https://services2.arcgis.com/NEwhEo9GGSHXcRXV/arcgis/rest/services/Cicloparqueaderos_Certificados_Bogota_D_C/FeatureServer/0",
            
            //Render
            renderer: pointsRenderer,
            outFields: ["*"],

          popupTemplate: {
            title: "Cicloparqueaderos Certificados Bogota D.C {COD_CICP}",
            content: [
              {
                type: "fields", // FieldsContentElement
                fieldInfos: [
                  {
                    fieldName: "COD_CICP",
                    visible: true,
                    label: "Codigo_Cicloparqueadero",
                  },
                  {
                    fieldName: "NOMBRE_CICP",
                    visible: true,
                    label: "Nombre_Cicloparqueadero",
                  },
                  {
                    fieldName: "HORARIO_CICP",
                    visible: true,
                    label: "Horario_CicP",
                  },
                  {
                    fieldName: "DIRECCION",
                    visible: true,
                    label: "DIRECCION",
                  },
                  {
                    fieldName: "LOCALIDAD",
                    visible: true,
                    label: "LOCALIDAD",
                  },
                  {
                    fieldName: "CUPOS",
                    visible: true,
                    label: "Cupos_Bici",
                  },
                  {
                    fieldName: "TIPOLOGIA_CICP",
                    visible: true,
                    label: "Tipologia_Cicloparqueadero",
                  },
                  {
                    fieldName: "SELLO",
                    visible: true,
                    label: "SELLO_TIPO",
                  },
                ],
              },
            ],
          },
        });
    

        map.add(trailheadsLayer);
        

        var directionsWidget = new Directions({
          view: view,

          // Apunte la URL a un servicio de ruta válido que utilice un
          // Proxy de servicio alojado de ArcGIS Online en lugar del servicio predeterminado
          routeServiceUrl:
            "https://utility.arcgis.com/usrsvcs/appservices/srsKxBIxJZB0pTZ0/rest/services/World/Route/NAServer/Route_World",
          container: document.createElement("div")
        });

        var directionsExpand = new Expand({
        view: view,
        content: new Directions({
            view: view,
            routeServiceUrl:
            "https://utility.arcgis.com/usrsvcs/appservices/srsKxBIxJZB0pTZ0/rest/services/World/Route/NAServer/Route_World",
            container: document.createElement("div")
          })
        });
        // Load

        isResponsiveSize = view.widthBreakpoint === "xsmall";
        updateView(isResponsiveSize);

        // Breakpoints

        view.watch("widthBreakpoint", function(breakpoint) {
          switch (breakpoint) {
            case "xsmall":
              updateView(true);
              break;
            case "small":
            case "medium":
            case "large":
            case "xlarge":
              updateView(false);
              break;
            default:
          }
        });

        function updateView(isMobile) {
          setTitleMobile(isMobile);
          setLegendMobile(isMobile);
        }

        function setTitleMobile(isMobile) {
          if (isMobile) {
            document.querySelector("#titleDiv").classList.add("invisible");
            view.padding = {
              top: 0
            };
          } else {
            document.querySelector("#titleDiv").classList.remove("invisible");
            view.padding = {
              top: 55
            };
          }
        }
        function setLegendMobile(isMobile) {
          var toAdd = isMobile ? directionsExpand : directionsWidget;
          var toRemove = isMobile ? directionsWidget : directionsExpand;

          view.ui.remove(toRemove);
          view.ui.add(toAdd, "top-right");
        }

        // Agrega el widget Indicaciones en la esquina superior derecha de la vista
        // view.ui.add(directionsExpand, {
        //   position: "top-right",
        // });
      });
    &amp;lt;/script&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;div id="titleDiv" class="esri-widget"&amp;gt;&amp;lt;div id="title"&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;
    &amp;lt;div id="viewDiv"&amp;gt;&amp;lt;/div&amp;gt;
    &amp;lt;div id="instruction" class="esri-widget"&amp;gt;
      Haga clic en cualquier ubicación en el mapa para ver su dirección postal
    &amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The points I want to change for the images are these:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EdissonGabrielLópezSalamanca_0-1615760085142.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/8412iAA779EA5211AA2A5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="EdissonGabrielLópezSalamanca_0-1615760085142.png" alt="EdissonGabrielLópezSalamanca_0-1615760085142.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;link api (&lt;A href="https://services2.arcgis.com/NEwhEo9GGSHXcRXV/arcgis/rest/services/Cicloparqueaderos_Certificados_Bogota_D_C/FeatureServer/0" target="_blank"&gt;https://services2.arcgis.com/NEwhEo9GGSHXcRXV/arcgis/rest/services/Cicloparqueaderos_Certificados_Bogota_D_C/FeatureServer/0&lt;/A&gt;?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope you can help me, thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 14 Mar 2021 22:18:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-point-styles-in-api-for-javascript-web-apps/m-p/1036387#M72056</guid>
      <dc:creator>EdissonGabrielLópezSalamanca</dc:creator>
      <dc:date>2021-03-14T22:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: Change point styles in Api for JavaScript - web apps</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-point-styles-in-api-for-javascript-web-apps/m-p/1036581#M72058</link>
      <description>&lt;P&gt;In your renderer, you didn't indicate what field you wanted to apply the unique value renderer.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var pointsRenderer = {
 type: "unique-value",
 field: "Sello", //this was left out
 uniqueValueInfos: [
   {
     value: "1",
     symbol: goldImg
   }, {
     value: "2",
     symbol: silverImg
   }
 ]
};&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 15 Mar 2021 13:20:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-point-styles-in-api-for-javascript-web-apps/m-p/1036581#M72058</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-03-15T13:20:06Z</dc:date>
    </item>
  </channel>
</rss>

