<?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: Add single marker based on coordinates in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-single-marker-based-on-coordinates/m-p/1199361#M78174</link>
    <description>&lt;P&gt;Thank you for your answer, I missed that indeed.&lt;/P&gt;&lt;P&gt;Unfortunately, I edited my code but I still get the same error.&lt;/P&gt;</description>
    <pubDate>Thu, 04 Aug 2022 13:34:33 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2022-08-04T13:34:33Z</dc:date>
    <item>
      <title>Add single marker based on coordinates</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-single-marker-based-on-coordinates/m-p/1199335#M78172</link>
      <description>&lt;P&gt;I'm developing a custom widget on Experience Builder, that would basically have additionnal features than the Search Widget, especially since we have a particular geolocator.&lt;/P&gt;&lt;P&gt;It's all working good, until I want to add a marker to the map to mark the location searched by the user.&lt;/P&gt;&lt;P&gt;I tried to use the sample provided by the documentation and have slightly adapted for EB, but I get a Typescript error when I create the Graphic object ("t is undefined"). I don't get the error without these lines.&lt;/P&gt;&lt;P&gt;What am I missing ?&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;let graphicB = new Graphic({  // graphic with point geometry
        geometry: new Point({ x: evt.value.x, y: evt.value.y }), // set geometry from user coordinates here
        symbol: new SimpleMarkerSymbol({
          type: "simple-marker",  // autocasts as new SimpleMarkerSymbol()
          style: "square",
          color: "blue",
          size: "8px",  // pixels
          outline: {  // autocasts as new SimpleLineSymbol()
            color: [255, 255, 0],
            width: 3  // points
          }
        }) // set symbol here
      });
      let layer = new GraphicsLayer({
        graphics: [graphicB]
      });
      this.state.jimuMapView.map.add(layer);&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 04 Aug 2022 12:18:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-single-marker-based-on-coordinates/m-p/1199335#M78172</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-08-04T12:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: Add single marker based on coordinates</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-single-marker-based-on-coordinates/m-p/1199341#M78173</link>
      <description>&lt;P&gt;TypeScript doesn't work with &lt;A href="https://developers.arcgis.com/javascript/latest/programming-patterns/#autocasting" target="_self"&gt;autocasting&lt;/A&gt;, so you'll have to add a Color and an Outline explicitly&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;      symbol: new SimpleMarkerSymbol({
        style: "square",
        color: new Color([0, 0, 255]),
        size: "8px",
        outline: new SimpleLineSymbol({
          color: new Color([255, 255, 0]),
          width: 3
        })
      })&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 12:52:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-single-marker-based-on-coordinates/m-p/1199341#M78173</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2022-08-04T12:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Add single marker based on coordinates</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-single-marker-based-on-coordinates/m-p/1199361#M78174</link>
      <description>&lt;P&gt;Thank you for your answer, I missed that indeed.&lt;/P&gt;&lt;P&gt;Unfortunately, I edited my code but I still get the same error.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 13:34:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-single-marker-based-on-coordinates/m-p/1199361#M78174</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-08-04T13:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Add single marker based on coordinates</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-single-marker-based-on-coordinates/m-p/1199496#M78177</link>
      <description>&lt;P&gt;When creating the Point with x/y, you also need to set the spatialReference. If you know the SR matches the the map, you can use view.SpatialReference.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;geometry: new Point({
    x: event.value.x, y: event.value.y,
    spatialReference: view.spatialReference // set sr of Point
}),&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 17:13:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-single-marker-based-on-coordinates/m-p/1199496#M78177</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2022-08-04T17:13:12Z</dc:date>
    </item>
  </channel>
</rss>

