<?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: Set map rotation to orient north in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/set-map-rotation-to-orient-north/m-p/1002569#M6854</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;I am using the rotateEnabled property and&amp;nbsp;setViewpointRotation(&lt;SPAN&gt;0&lt;/SPAN&gt;, completion: &lt;SPAN&gt;nil&lt;/SPAN&gt;) and the result is a default offline map of San Francisco which requires downloading the entire world map.&lt;/BLOCKQUOTE&gt;&lt;P class="1605714931541"&gt;Can you provide more context please? Is this an application you have built from scratch or is it based off a sample or example app?&lt;/P&gt;&lt;P class="1605714931541"&gt;I am not sure what the screenshot is that you provided (it doesn't look like San Francisco).&lt;/P&gt;</description>
    <pubDate>Wed, 18 Nov 2020 15:56:23 GMT</pubDate>
    <dc:creator>Nicholas-Furness</dc:creator>
    <dc:date>2020-11-18T15:56:23Z</dc:date>
    <item>
      <title>Set map rotation to orient north</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/set-map-rotation-to-orient-north/m-p/1002217#M6851</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using the most recent version of Runtime SDK and having a hard time understanding what the point of&amp;nbsp;&lt;/P&gt;&lt;P&gt;setViewpointRotation is if it does not orient north, at any coordinate. How do I achieve the desired result of orienting the map the way Google Maps does- always north?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 18:05:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/set-map-rotation-to-orient-north/m-p/1002217#M6851</guid>
      <dc:creator>NaomiSchettini</dc:creator>
      <dc:date>2020-11-17T18:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set map rotation to orient north</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/set-map-rotation-to-orient-north/m-p/1002561#M6852</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/417753"&gt;@NaomiSchettini&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;The method allows you to specify any rotation (for example, if you are following a route, you may want the map to always point in the direction you are moving). If you want to reset it to north, just pass in 0.&lt;/P&gt;&lt;P&gt;However, if you want to prevent the user rotating the map at all, you can look at the &lt;A href="https://developers.arcgis.com/ios/latest/api-reference/interface_a_g_s_map_view_common.html#a90465bd2154b0f85aa1a89c1dd50baad" target="_self"&gt;&lt;STRONG&gt;interactionOptions&lt;/STRONG&gt;&lt;/A&gt; property on &lt;A href="https://developers.arcgis.com/ios/latest/api-reference/interface_a_g_s_map_view_common.html" target="_self"&gt;&lt;STRONG&gt;AGSMapView&lt;/STRONG&gt;&lt;/A&gt;. This is an &lt;A href="https://developers.arcgis.com/ios/latest/api-reference/interface_a_g_s_map_view_interaction_options.html" target="_self"&gt;&lt;STRONG&gt;AGSMapViewInteractionOptions&lt;/STRONG&gt;&lt;/A&gt; object, and you can set the &lt;A href="https://developers.arcgis.com/ios/latest/api-reference/interface_a_g_s_map_view_interaction_options.html#a0237745762eb39337f3c671ec90255a3" target="_self"&gt;&lt;STRONG&gt;rotateEnabled&lt;/STRONG&gt;&lt;/A&gt; property to false.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 15:38:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/set-map-rotation-to-orient-north/m-p/1002561#M6852</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2020-11-18T15:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: Set map rotation to orient north</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/set-map-rotation-to-orient-north/m-p/1002567#M6853</link>
      <description>&lt;P&gt;I am using the rotateEnabled property and&amp;nbsp;setViewpointRotation(&lt;SPAN&gt;0&lt;/SPAN&gt;, completion: &lt;SPAN&gt;nil&lt;/SPAN&gt;) and the result is a default offline map of San Francisco which requires downloading the entire world map. If I remove,&amp;nbsp;setViewpointRotation(&lt;SPAN&gt;0&lt;/SPAN&gt;, completion: &lt;SPAN&gt;nil&lt;/SPAN&gt;), the downloading of the entire world map disappears but then rotateEnabled = false does not seem to work. I am not sure if it's timing sensitive or something, but I just need to tackle the two issues: not downloading the entire world map but also facing north by default. Do you have suggestions&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IMG_0622.PNG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/454iDA5C2D1BEE7F90F5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="IMG_0622.PNG" alt="IMG_0622.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 15:49:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/set-map-rotation-to-orient-north/m-p/1002567#M6853</guid>
      <dc:creator>NaomiSchettini</dc:creator>
      <dc:date>2020-11-18T15:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set map rotation to orient north</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/set-map-rotation-to-orient-north/m-p/1002569#M6854</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;I am using the rotateEnabled property and&amp;nbsp;setViewpointRotation(&lt;SPAN&gt;0&lt;/SPAN&gt;, completion: &lt;SPAN&gt;nil&lt;/SPAN&gt;) and the result is a default offline map of San Francisco which requires downloading the entire world map.&lt;/BLOCKQUOTE&gt;&lt;P class="1605714931541"&gt;Can you provide more context please? Is this an application you have built from scratch or is it based off a sample or example app?&lt;/P&gt;&lt;P class="1605714931541"&gt;I am not sure what the screenshot is that you provided (it doesn't look like San Francisco).&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 15:56:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/set-map-rotation-to-orient-north/m-p/1002569#M6854</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2020-11-18T15:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Set map rotation to orient north</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/set-map-rotation-to-orient-north/m-p/1002571#M6855</link>
      <description>&lt;P&gt;It's an app I did not build from scratch. It just uses the ArcGIS Runtime SDK.&lt;/P&gt;&lt;P&gt;This is the code for generating the map where I think it sets the default offline map to SF East Bay (Alameda, etc):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="swift"&gt; let portal = AGSPortal.arcGISOnline(withLoginRequired: false)
        portal.credential = Configuration.shared.ArcGISServiceUserCredentials
        // portal item for web map
        let portalItem = AGSPortalItem(portal: portal, itemID: Configuration.shared.ArcGISPortalItemId)
        viewModel = ECOCreateProjectAreaViewModel(projectUID: projectUID)
        self.portalItem = portalItem
        let map = AGSMap(item: portalItem)
        map.basemap = .imageryWithLabels()​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;I just tested this again and confirm that it is this specific line which causes the Alameda map to show and when "Download Area" is tapped, an entire world map is downloaded:&amp;nbsp;&lt;SPAN class="Apple-converted-space"&gt;``` &amp;nbsp;&lt;/SPAN&gt;mapView.setViewpointRotation(&lt;SPAN&gt;0&lt;/SPAN&gt;, completion: &lt;SPAN&gt;nil&lt;/SPAN&gt;) ```&lt;/P&gt;&lt;P&gt;The reason this occurs, I presume is because the default basemap (the Alameda map) does not have an existing mapScale so it is defaulting to&amp;nbsp;&lt;STRONG&gt;200000.0&amp;nbsp;&lt;/STRONG&gt;which is why the whole world map gets downloaded. Let me know if this information is sufficient to understand my problem. The portal id is:&amp;nbsp;0e2e4f11d4ce4c14a9f93d37dc089e92&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 18:20:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/set-map-rotation-to-orient-north/m-p/1002571#M6855</guid>
      <dc:creator>NaomiSchettini</dc:creator>
      <dc:date>2020-11-18T18:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Set map rotation to orient north</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/set-map-rotation-to-orient-north/m-p/1002716#M6856</link>
      <description>&lt;P&gt;I'm afraid that doesn't really give us anything to work with.&lt;/P&gt;&lt;P&gt;The code you provide is accessing a web map, and changing the basemap to be the standard Imagery With Labels basemap.&lt;/P&gt;&lt;P&gt;setViewpointRotation() will only affect the AGSMapView rotation and will not change the scale.&lt;/P&gt;&lt;P&gt;When you take a map offline, you use an &lt;A href="https://developers.arcgis.com/ios/latest/api-reference/interface_a_g_s_offline_map_task.html" target="_self"&gt;&lt;STRONG&gt;AGSOfflineMapTask&lt;/STRONG&gt;&lt;/A&gt;. From that you &lt;A href="https://developers.arcgis.com/ios/latest/api-reference/interface_a_g_s_offline_map_task.html#ad3f5a48bb1970cea4922c77df3532116" target="_self"&gt;create default parameters&lt;/A&gt; for a geographic area you want to take offline. You then &lt;A href="https://developers.arcgis.com/ios/latest/api-reference/interface_a_g_s_offline_map_task.html#a01a3bd0e4d698741314ebdfdc2b80073" target="_self"&gt;&lt;STRONG&gt;create an AGSGenerateOfflineMapJob&lt;/STRONG&gt;&lt;/A&gt; and start it. You should check the code that's setting the parameters to see what, if anything, is happening to the geometry that's being passed in. If you're getting the whole world downloaded, it could be that the geometry isn't being set, so is there some way that setting the viewpoint rotation to 0 is clearing out some geometry property that is being used to track what to download?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 21:28:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/set-map-rotation-to-orient-north/m-p/1002716#M6856</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2020-11-18T21:28:32Z</dc:date>
    </item>
  </channel>
</rss>

