<?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 How can I find out if a lat/lng exists inside a polygon? Javascript 4x. in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-i-find-out-if-a-lat-lng-exists-inside-a/m-p/1123428#M75501</link>
    <description>&lt;P&gt;I have a polygon. I have a point. I want to know if the point is inside the polygon.&amp;nbsp;&lt;/P&gt;&lt;P&gt;rings == [[[lat, lng],[lat, lng]...]]&lt;/P&gt;&lt;P&gt;I've also tried: rings ==&amp;nbsp;[[lat, lng],[lat, lng],...]&lt;/P&gt;&lt;P&gt;My Polygon is created like:&amp;nbsp; var&amp;nbsp;poly = new Polygon({ rings, spatialReference: { wkid: 4326 } });&lt;/P&gt;&lt;P&gt;My Point is created like:&amp;nbsp; var&amp;nbsp;pointy = new Point({ latitude, longitude, spatialReference: { wkid: 4326 } });&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;poly.contains(pointy) always returns false. What am I doing wrong?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Dec 2021 17:26:35 GMT</pubDate>
    <dc:creator>ScottAndersonGQ</dc:creator>
    <dc:date>2021-12-07T17:26:35Z</dc:date>
    <item>
      <title>How can I find out if a lat/lng exists inside a polygon? Javascript 4x.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-i-find-out-if-a-lat-lng-exists-inside-a/m-p/1123428#M75501</link>
      <description>&lt;P&gt;I have a polygon. I have a point. I want to know if the point is inside the polygon.&amp;nbsp;&lt;/P&gt;&lt;P&gt;rings == [[[lat, lng],[lat, lng]...]]&lt;/P&gt;&lt;P&gt;I've also tried: rings ==&amp;nbsp;[[lat, lng],[lat, lng],...]&lt;/P&gt;&lt;P&gt;My Polygon is created like:&amp;nbsp; var&amp;nbsp;poly = new Polygon({ rings, spatialReference: { wkid: 4326 } });&lt;/P&gt;&lt;P&gt;My Point is created like:&amp;nbsp; var&amp;nbsp;pointy = new Point({ latitude, longitude, spatialReference: { wkid: 4326 } });&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;poly.contains(pointy) always returns false. What am I doing wrong?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 17:26:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-i-find-out-if-a-lat-lng-exists-inside-a/m-p/1123428#M75501</guid>
      <dc:creator>ScottAndersonGQ</dc:creator>
      <dc:date>2021-12-07T17:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: How can I find out if a lat/lng exists inside a polygon? Javascript 4x.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-i-find-out-if-a-lat-lng-exists-inside-a/m-p/1123456#M75502</link>
      <description>&lt;P&gt;If the point exists on one of the vertices or along the edge of the polygon, then contains will return false, since it is not fully contained. You can try using &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#intersects" target="_self"&gt;intersects&lt;/A&gt; in the geometry engine to see if that will give you a better answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a demo.&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/odoe/pen/bGopRPo?editors=0011" target="_blank"&gt;https://codepen.io/odoe/pen/bGopRPo?editors=0011&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 17:56:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-i-find-out-if-a-lat-lng-exists-inside-a/m-p/1123456#M75502</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-12-07T17:56:58Z</dc:date>
    </item>
  </channel>
</rss>

