<?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: Swift IOS - Camera focus view in Swift Maps SDK Questions</title>
    <link>https://community.esri.com/t5/swift-maps-sdk-questions/swift-ios-camera-focus-view/m-p/1418839#M264</link>
    <description>&lt;P&gt;See this sample&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-runtime-samples-ios/blob/main/arcgis-ios-sdk-samples/Maps/Set%20initial%20map%20area/SetInitialMapAreaViewController.swift" target="_blank"&gt;https://github.com/Esri/arcgis-runtime-samples-ios/blob/main/arcgis-ios-sdk-samples/Maps/Set%20initial%20map%20area/SetInitialMapAreaViewController.swift&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Let me know if it helps or you have more questions.&lt;/P&gt;</description>
    <pubDate>Fri, 03 May 2024 16:48:48 GMT</pubDate>
    <dc:creator>Ting</dc:creator>
    <dc:date>2024-05-03T16:48:48Z</dc:date>
    <item>
      <title>Swift IOS - Camera focus view</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/swift-ios-camera-focus-view/m-p/1418030#M263</link>
      <description>&lt;P&gt;Camera focused using map extent (4 co ordinates min – max X and min – max Y).&lt;/P&gt;&lt;P&gt;My Code:&lt;/P&gt;&lt;P&gt;self.map.maxExtent = Envelope(xMin: self.xMin!, yMin: self.yMin!, xMax: self.xMax!, yMax: self.yMax!, spatialReference: .wgs84)&lt;/P&gt;&lt;P&gt;self.map.initialViewpoint = Viewpoint(boundingGeometry: self.map.maxExtent!.center, camera: Camera(lookingAt: self.map.maxExtent!.center, distance: 5500, heading: 150, pitch: 20, roll: 0))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But its not working.&amp;nbsp; That means Camera is not focusing on view map.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2024 12:17:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/swift-ios-camera-focus-view/m-p/1418030#M263</guid>
      <dc:creator>JyoshnaRani</dc:creator>
      <dc:date>2024-05-02T12:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: Swift IOS - Camera focus view</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/swift-ios-camera-focus-view/m-p/1418839#M264</link>
      <description>&lt;P&gt;See this sample&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-runtime-samples-ios/blob/main/arcgis-ios-sdk-samples/Maps/Set%20initial%20map%20area/SetInitialMapAreaViewController.swift" target="_blank"&gt;https://github.com/Esri/arcgis-runtime-samples-ios/blob/main/arcgis-ios-sdk-samples/Maps/Set%20initial%20map%20area/SetInitialMapAreaViewController.swift&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Let me know if it helps or you have more questions.&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2024 16:48:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/swift-ios-camera-focus-view/m-p/1418839#M264</guid>
      <dc:creator>Ting</dc:creator>
      <dc:date>2024-05-03T16:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Swift IOS - Camera focus view</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/swift-ios-camera-focus-view/m-p/1419151#M265</link>
      <description>&lt;P&gt;Hello Ting,&lt;/P&gt;&lt;P&gt;Thank you for your answer. But I'm looking for swift UI View.&lt;/P&gt;&lt;P&gt;Like :&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;struct &lt;/SPAN&gt;GisMapView: View {&lt;BR /&gt;  var map = Map(basemapStyle: .arcGISTopographic)&lt;SPAN&gt; &lt;BR /&gt;  &lt;BR /&gt;  func loadMap(){&lt;BR /&gt;   self.map.maxExtent = Envelope(xMin: self.xMin!, yMin: self.yMin!, xMax: self.xMax!, yMax: self.yMax!, spatialReference: .wgs84)&lt;BR /&gt;   self.map.initialViewpoint = Viewpoint(boundingGeometry: self.map.maxExtent!.center, camera: Camera(lookingAt: self.map.maxExtent!.center, distance: 5500, heading: 150, pitch: 20, roll: 0))&lt;BR /&gt;  }&lt;BR /&gt;&lt;BR /&gt;  var body: some View {&lt;BR /&gt;   MapView(map: map)&lt;BR /&gt;  }&lt;BR /&gt;}&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;This is the code I wrote but it's not reflecting on map. Map is loading but not in particular camera location.&lt;/P&gt;&lt;P&gt;Hope this way I explained my query.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 03:31:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/swift-ios-camera-focus-view/m-p/1419151#M265</guid>
      <dc:creator>JyoshnaRani</dc:creator>
      <dc:date>2024-05-06T03:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: Swift IOS - Camera focus view</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/swift-ios-camera-focus-view/m-p/1419487#M266</link>
      <description>&lt;P&gt;There are multiple issues with your snippet&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Please note the difference between a &lt;EM&gt;&lt;A href="https://developers.arcgis.com/swift/api-reference/documentation/arcgis/map" target="_self"&gt;Map&lt;/A&gt;&lt;/EM&gt; and a &lt;EM&gt;&lt;A href="https://developers.arcgis.com/swift/api-reference/documentation/arcgis/scene" target="_self"&gt;Scene&lt;/A&gt;&lt;/EM&gt; in ArcGIS context. In other mapping frameworks, they may call a Scene something like "3D map" or "Globe mode", etc. In ArcGIS, 3D mapping is specifically represented as a scene. Therefore, in order to set a camera angle, you'll need a 3D scene so it allows the 3D perspectives.&lt;/LI&gt;&lt;LI&gt;Currently we only support "global scenes" in the Swift API, while local scene is under development. See &lt;A href="https://doc.arcgis.com/en/arcgis-online/create-maps/choose-global-local-scene.htm" target="_self"&gt;this article&lt;/A&gt; for the difference between these two. In short, global is a globe, local is a plane.&lt;/LI&gt;&lt;LI&gt;It is a common mistake to pass in out of range values to a certain spatial reference. For example, WGS 84 allows -89 ~ +89 latitude, -180 ~ +180 longitude. If the values to create an Envelope is greater than those ranges, the geometry would be invalid. I'm assuming you understand the difference there.&lt;/LI&gt;&lt;LI&gt;For a 3D scene, setting the camera will override the bounding geometry. That is, no matter what bounding geometry you pass in for a 3D scene, if there is a camera, it will use the camera first.&lt;/LI&gt;&lt;LI&gt;Please note the importance of using &lt;STRONG&gt;&lt;EM&gt;State&lt;/EM&gt;&lt;/STRONG&gt; property wrapper in SwiftUI. By marking a geomodel as a state, it retains the source-of-truth-ness of it. Read &lt;A href="https://developers.arcgis.com/swift/api-reference/documentation/arcgis/workingwithgeoviews/" target="_self"&gt;this article&lt;/A&gt; to get a better understanding.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With all these said, check out this sample to get an idea:&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-maps-sdk-swift-samples/blob/main/Shared/Samples/Display%20scene/DisplaySceneView.swift" target="_blank"&gt;https://github.com/Esri/arcgis-maps-sdk-swift-samples/blob/main/Shared/Samples/Display%20scene/DisplaySceneView.swift&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if you have more questions.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 16:34:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/swift-ios-camera-focus-view/m-p/1419487#M266</guid>
      <dc:creator>Ting</dc:creator>
      <dc:date>2024-05-06T16:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Swift IOS - Camera focus view</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/swift-ios-camera-focus-view/m-p/1419746#M267</link>
      <description>&lt;P&gt;Hello Ting,&lt;/P&gt;&lt;P&gt;In my previous reply I tried to tell that - I am using 'View' in swift SDK for ArcGIS. That is just a sample code where I can show you - I am not using "UIViewController " as you provided in a solution - "&lt;SPAN&gt;See this sample&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://github.com/Esri/arcgis-runtime-samples-ios/blob/main/arcgis-ios-sdk-samples/Maps/Set%20initial%20map%20area/SetInitialMapAreaViewController.swift" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/Esri/arcgis-runtime-samples-ios/blob/main/arcgis-ios-sdk-samples/Maps/Set%20initi...&lt;/A&gt;"&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I am looking a class example of ArcGIS which is extended with View not&amp;nbsp;&amp;nbsp;UIViewController, and I am using ArcGIS SDK for Swift not ArcGIS SDK for IOS.&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2024 05:14:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/swift-ios-camera-focus-view/m-p/1419746#M267</guid>
      <dc:creator>JyoshnaRani</dc:creator>
      <dc:date>2024-05-07T05:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: Swift IOS - Camera focus view</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/swift-ios-camera-focus-view/m-p/1419751#M270</link>
      <description>&lt;P&gt;Maybe you missed the latest reply. Did you see the one above your post?&lt;/P&gt;&lt;P&gt;I moved your thread to the right sub forum.&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2024 05:47:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/swift-ios-camera-focus-view/m-p/1419751#M270</guid>
      <dc:creator>Ting</dc:creator>
      <dc:date>2024-05-07T05:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: Swift IOS - Camera focus view</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/swift-ios-camera-focus-view/m-p/1420258#M273</link>
      <description>&lt;P&gt;Hello Ting,&lt;/P&gt;&lt;P&gt;Can you share the details - "&lt;SPAN&gt;I moved your thread to the right sub forum."&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 04:19:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/swift-ios-camera-focus-view/m-p/1420258#M273</guid>
      <dc:creator>JyoshnaRani</dc:creator>
      <dc:date>2024-05-08T04:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Swift IOS - Camera focus view</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/swift-ios-camera-focus-view/m-p/1420499#M274</link>
      <description>&lt;P&gt;Sure. When posting on Esri Community, we have &lt;A href="https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/bd-p/arcgis-runtime-sdk-for-ios-questions" target="_self"&gt;Runtime SDK for iOS Questions&lt;/A&gt; and&amp;nbsp;&lt;A href="https://community.esri.com/t5/swift-maps-sdk-questions/bd-p/swift-maps-sdk-questions" target="_self"&gt;Swift Maps SDK Questions&lt;/A&gt; sub forums.&lt;/P&gt;&lt;P&gt;The former is for the 100.x version&amp;nbsp;ArcGIS Runtime API for iOS, which is for UIKit + Swift/ObjC development and currently in long term support (retired), while 200.x ArcGIS Maps SDK for Swift is for SwiftUI + Swift development.&lt;/P&gt;&lt;P&gt;When you first posted this question, it was moved by an Esri colleague to the iOS sub forum, so I moved this thread to the Swift sub forum as you are asking about SwiftUI.&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 15:55:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/swift-ios-camera-focus-view/m-p/1420499#M274</guid>
      <dc:creator>Ting</dc:creator>
      <dc:date>2024-05-08T15:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: Swift IOS - Camera focus view</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/swift-ios-camera-focus-view/m-p/1420835#M279</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/440371"&gt;@Ting&lt;/a&gt;&amp;nbsp;for this clarity.&lt;/P&gt;&lt;P&gt;Hoping to hear from &lt;SPAN&gt;SwiftUI + Swift development team&amp;nbsp;&lt;/SPAN&gt;soon.&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2024 04:04:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/swift-ios-camera-focus-view/m-p/1420835#M279</guid>
      <dc:creator>JyoshnaRani</dc:creator>
      <dc:date>2024-05-09T04:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: Swift IOS - Camera focus view</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/swift-ios-camera-focus-view/m-p/1423556#M280</link>
      <description>&lt;P&gt;Just want to double check that you've seen my reply at&amp;nbsp;&lt;A href="https://community.esri.com/t5/swift-maps-sdk-questions/swift-ios-camera-focus-view/m-p/1419487/highlight/true#M266" target="_blank"&gt;https://community.esri.com/t5/swift-maps-sdk-questions/swift-ios-camera-focus-view/m-p/1419487/highlight/true#M266&lt;/A&gt;&amp;nbsp;Let me know if you have more questions.&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2024 16:52:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/swift-ios-camera-focus-view/m-p/1423556#M280</guid>
      <dc:creator>Ting</dc:creator>
      <dc:date>2024-05-09T16:52:43Z</dc:date>
    </item>
  </channel>
</rss>

