<?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 Want to add id to the target point, how do I determine which id the line is from the obtained route? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/want-to-add-id-to-the-target-point-how-do-i/m-p/1203123#M78303</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hello everyone!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am currently trying to&amp;nbsp;categorize routes,&amp;nbsp; how do I determine which id the line is from the obtained route?&lt;/SPAN&gt;&lt;SPAN&gt;Reference material:&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/documentation/mapping-apis-and-services/routing/closest-facility-routing/" target="_self" rel="nofollow noopener noreferrer"&gt;Closest facility routing&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is the code I am using:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const facilities = [
          {
            id: "school",
            center: [-122.67484, 45.52087],
          },
          {
            id: "library",
            center: [-122.68365, 45.52327],
          },
          {
            id: "playground",
            center: [-122.66406, 45.52378],
          },
          {
            id: "amusementPark",
            center: [-122.6631, 45.52093],
          },
          {
            id: "factory",
            center: [-122.66208, 45.5197],
          },
          {
            id: "hospital",
            center: [-122.66247, 45.51845],
          },
          {
            id: "market",
            center: [-122.66299, 45.51827],
          },
        ];


function addFacilityGraphics() {
        facilities.forEach((point) =&amp;gt; {
          facilitiesLayer.graphics.add(
            new Graphic({
              id: point.id,
              symbol: {
                type: "web-style",
                name: "grocery-store",
                styleName: "Esri2DPointSymbolsStyle",
              },
              geometry: {
                type: "point",
                longitude: point.center[0],
                latitude: point.center[1],
                spatialReference: view.spatialReference,
              },
            })
          );
        });
      }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Aug 2022 03:43:03 GMT</pubDate>
    <dc:creator>Storylm</dc:creator>
    <dc:date>2022-08-16T03:43:03Z</dc:date>
    <item>
      <title>Want to add id to the target point, how do I determine which id the line is from the obtained route?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/want-to-add-id-to-the-target-point-how-do-i/m-p/1203123#M78303</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello everyone!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am currently trying to&amp;nbsp;categorize routes,&amp;nbsp; how do I determine which id the line is from the obtained route?&lt;/SPAN&gt;&lt;SPAN&gt;Reference material:&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/documentation/mapping-apis-and-services/routing/closest-facility-routing/" target="_self" rel="nofollow noopener noreferrer"&gt;Closest facility routing&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is the code I am using:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const facilities = [
          {
            id: "school",
            center: [-122.67484, 45.52087],
          },
          {
            id: "library",
            center: [-122.68365, 45.52327],
          },
          {
            id: "playground",
            center: [-122.66406, 45.52378],
          },
          {
            id: "amusementPark",
            center: [-122.6631, 45.52093],
          },
          {
            id: "factory",
            center: [-122.66208, 45.5197],
          },
          {
            id: "hospital",
            center: [-122.66247, 45.51845],
          },
          {
            id: "market",
            center: [-122.66299, 45.51827],
          },
        ];


function addFacilityGraphics() {
        facilities.forEach((point) =&amp;gt; {
          facilitiesLayer.graphics.add(
            new Graphic({
              id: point.id,
              symbol: {
                type: "web-style",
                name: "grocery-store",
                styleName: "Esri2DPointSymbolsStyle",
              },
              geometry: {
                type: "point",
                longitude: point.center[0],
                latitude: point.center[1],
                spatialReference: view.spatialReference,
              },
            })
          );
        });
      }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 03:43:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/want-to-add-id-to-the-target-point-how-do-i/m-p/1203123#M78303</guid>
      <dc:creator>Storylm</dc:creator>
      <dc:date>2022-08-16T03:43:03Z</dc:date>
    </item>
  </channel>
</rss>

