<?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 to implement mapView.visibleArea().contains(graphic)? in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-to-implement-mapview-visiblearea-contains/m-p/37374#M339</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;v10.2.5 had an ability to tell if the mapView contains a graphic: &amp;nbsp;&lt;SPAN class=""&gt;mapView.visibleArea().contains(graphic.geometry.envelope.center). In v 100.0 there is no contains method for&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;mapView.visibleArea which is AGSPolygon. It's easy to just take a polygon and start comparing xmin xmax ymin ymax, the caveat is to do it with respect to rotation angle. Any ideas?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 May 2017 20:29:24 GMT</pubDate>
    <dc:creator>NikolayYekimov1</dc:creator>
    <dc:date>2017-05-23T20:29:24Z</dc:date>
    <item>
      <title>How to implement mapView.visibleArea().contains(graphic)?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-to-implement-mapview-visiblearea-contains/m-p/37374#M339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;v10.2.5 had an ability to tell if the mapView contains a graphic: &amp;nbsp;&lt;SPAN class=""&gt;mapView.visibleArea().contains(graphic.geometry.envelope.center). In v 100.0 there is no contains method for&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;mapView.visibleArea which is AGSPolygon. It's easy to just take a polygon and start comparing xmin xmax ymin ymax, the caveat is to do it with respect to rotation angle. Any ideas?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 May 2017 20:29:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-to-implement-mapview-visiblearea-contains/m-p/37374#M339</guid>
      <dc:creator>NikolayYekimov1</dc:creator>
      <dc:date>2017-05-23T20:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement mapView.visibleArea().contains(graphic)?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-to-implement-mapview-visiblearea-contains/m-p/37375#M340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your question! &amp;nbsp;Take a look at the AGSGeometryEngine class. &amp;nbsp;That has a method "geometry:containsGeometry", which should do what you want:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #000000; font-size: 12px;"&gt;&lt;SPAN style="color: #0433ff;"&gt;guard&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;let&lt;/SPAN&gt;&lt;SPAN&gt; visibleArea = mapView.visibleArea &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;else&lt;/SPAN&gt;&lt;SPAN&gt; { &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;return&lt;/SPAN&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-size: 12px;"&gt;&lt;SPAN style="color: #0433ff;"&gt;guard&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;let&lt;/SPAN&gt;&lt;SPAN&gt; graphicCenter = graphic.geometry?.extent.center &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;else&lt;/SPAN&gt;&lt;SPAN&gt; { &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;return&lt;/SPAN&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-size: 12px;"&gt;&lt;SPAN style="color: #0433ff;"&gt;let&lt;/SPAN&gt;&lt;SPAN&gt; isGraphicInMapView = AGSGeometryEngine.geometry(visibleArea, contains: graphicCenter)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 May 2017 20:57:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-to-implement-mapview-visiblearea-contains/m-p/37375#M340</guid>
      <dc:creator>MarkDostal</dc:creator>
      <dc:date>2017-05-23T20:57:17Z</dc:date>
    </item>
  </channel>
</rss>

