<?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: Extent.contains(geometry) Issue in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-contains-geometry-issue/m-p/443764#M40972</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The IDs 102100 and 3857 both represent the same spatial reference: &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;WGS84 Web Mercator (Auxiliary Sphere)&lt;/SPAN&gt;&lt;SPAN&gt;, so it would seem unlikely that the cause of the issue is due to a spatial reference system mismatch.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Jun 2013 19:16:57 GMT</pubDate>
    <dc:creator>JeffJacobson</dc:creator>
    <dc:date>2013-06-25T19:16:57Z</dc:date>
    <item>
      <title>Extent.contains(geometry) Issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-contains-geometry-issue/m-p/443763#M40971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a case one big polygon includes a polyline, but the code extent.contains(geometry) returns false.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I checked Xmin, Xmax, Ymin, Ymax for both object. polyline is inside of the polygon. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I do notice that the polygon's Spatial Reference wkid is 102100, the polyline has two SR, wkid 102100 and latestwkid 3857.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does extent.contains(geometry) check the SR?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If so, what should I do for the case?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tony&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jun 2013 18:16:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-contains-geometry-issue/m-p/443763#M40971</guid>
      <dc:creator>tonylife</dc:creator>
      <dc:date>2013-06-25T18:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: Extent.contains(geometry) Issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-contains-geometry-issue/m-p/443764#M40972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The IDs 102100 and 3857 both represent the same spatial reference: &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;WGS84 Web Mercator (Auxiliary Sphere)&lt;/SPAN&gt;&lt;SPAN&gt;, so it would seem unlikely that the cause of the issue is due to a spatial reference system mismatch.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jun 2013 19:16:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-contains-geometry-issue/m-p/443764#M40972</guid>
      <dc:creator>JeffJacobson</dc:creator>
      <dc:date>2013-06-25T19:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: Extent.contains(geometry) Issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-contains-geometry-issue/m-p/443765#M40973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The IDs 102100 and 3857 both represent the same spatial reference: &lt;SPAN style="font-style:italic;"&gt;WGS84 Web Mercator (Auxiliary Sphere)&lt;/SPAN&gt;, so it would seem unlikely that the cause of the issue is due to a spatial reference system mismatch.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The polygon geometry (xmin -9789042, xmax -9788311, ymin 5311122, ymax 5311413)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The polyline geometry (xmin -9788713, xmax -9788712, ymin 5311291, ymax 5311317)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems to me polyline is inside of polygon, am I missing somthing?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tony&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jun 2013 20:18:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-contains-geometry-issue/m-p/443765#M40973</guid>
      <dc:creator>tonylife</dc:creator>
      <dc:date>2013-06-25T20:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Extent.contains(geometry) Issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-contains-geometry-issue/m-p/443766#M40974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;esri/geometry/Extent::contains take a point or extent. Per the docs:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;Input Parameters:&lt;BR /&gt;&amp;lt;Geometry&amp;gt; geometry Required &lt;STRONG&gt;Can be a Point or Extent.&lt;/STRONG&gt;&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/en/javascript/jsapi/extent.html#contains"&gt;https://developers.arcgis.com/en/javascript/jsapi/extent.html#contains&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could use the extent of your line but not the line itself.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jun 2013 21:36:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-contains-geometry-issue/m-p/443766#M40974</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2013-06-25T21:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: Extent.contains(geometry) Issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-contains-geometry-issue/m-p/443767#M40975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;esri/geometry/Extent::contains take a point or extent. Per the docs:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/en/javascript/jsapi/extent.html#contains"&gt;https://developers.arcgis.com/en/javascript/jsapi/extent.html#contains&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;You could use the extent of your line but not the line itself.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does this work?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;Loop through each point in the polyline and check to see if it is contained in the extent.&lt;/LI&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;If one of the points is outside of the extent, you can break out of the loop. You know the answer is &lt;SPAN style="font-style:italic;"&gt;false&lt;/SPAN&gt;.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;If all of the points are contained in the extent, then the answer is &lt;SPAN style="font-style:italic;"&gt;true&lt;/SPAN&gt;.&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt; &lt;BR /&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 16:03:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-contains-geometry-issue/m-p/443767#M40975</guid>
      <dc:creator>JeffJacobson</dc:creator>
      <dc:date>2013-06-26T16:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: Extent.contains(geometry) Issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-contains-geometry-issue/m-p/443768#M40976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;esri/geometry/Extent::contains take a point or extent. Per the docs:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/en/javascript/jsapi/extent.html#contains"&gt;https://developers.arcgis.com/en/javascript/jsapi/extent.html#contains&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;You could use the extent of your line but not the line itself.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your information.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I do try the following area._extent.contains(graphic.geometry._extent).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The area's extent is xmin: -9788742, ymin: 5311210, xmax: -9788670, ymax: 5311361&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The graphic is a polyline, it's extent is&amp;nbsp; xmin: -9788713, ymin: 5311291, xmax: -9788712, ymax: 5311317&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The result is still FALSE. not sure why&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tony&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jun 2013 18:10:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-contains-geometry-issue/m-p/443768#M40976</guid>
      <dc:creator>tonylife</dc:creator>
      <dc:date>2013-06-27T18:10:28Z</dc:date>
    </item>
  </channel>
</rss>

