<?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: Calculating Scale/Distance from Map Resolution and Map Width in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/calculating-scale-distance-from-map-resolution-and/m-p/324359#M2835</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I initially calculated the distance from two lat/long points using other built in functions then saw that there were the extra properties on the map that you could use. I get the same result from both methods but when I compared the distance to a measurement taken in the arcgis iPad app for the same locations it's different. In one example my measurement was 2.9km but it was 2.3km in arcgis.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll keep looking...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Jun 2012 11:25:38 GMT</pubDate>
    <dc:creator>PaulDavis</dc:creator>
    <dc:date>2012-06-22T11:25:38Z</dc:date>
    <item>
      <title>Calculating Scale/Distance from Map Resolution and Map Width</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/calculating-scale-distance-from-map-resolution-and/m-p/324355#M2831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to display a scale indicator on a map and can't see any built in functionality to do this like I've seen with other examples like the web api (an inbuilt scale control that you can choose to show).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to calculate the width of the current map in kilometres and from what I've read the resolution property gives the map's current map units per Point. If I use the maps width, the resolution and the fact that the map units are in meters (divide by 1000).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;NSLog(@"Scale: %f, Resolution: %f, Width km: %f", mapView.mapScale, mapView.resolution, (mapView.frame.size.width * mapView.resolution) / 1000);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone confirm that I'm understanding this ok? Are there any other factors I need to take into consideration?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2012 06:28:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/calculating-scale-distance-from-map-resolution-and/m-p/324355#M2831</guid>
      <dc:creator>PaulDavis</dc:creator>
      <dc:date>2012-06-21T06:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Scale/Distance from Map Resolution and Map Width</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/calculating-scale-distance-from-map-resolution-and/m-p/324356#M2832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The map control's frame isn't going to change as you zoom.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The envelope does though. Use the width of that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@"%f", self.mapView.visibleArea.envelope.width);&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2012 12:50:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/calculating-scale-distance-from-map-resolution-and/m-p/324356#M2832</guid>
      <dc:creator>RickJones</dc:creator>
      <dc:date>2012-06-21T12:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Scale/Distance from Map Resolution and Map Width</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/calculating-scale-distance-from-map-resolution-and/m-p/324357#M2833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Rick,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for the reply. The resolution changes as you zoom so you get the new value when you subscribe to the MapDidEndZooming notification and check the mapView again. The maps frame not changing is ok as I would like to know how wide the map is (in kilometres) that fits into the current frame. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So given that resolution is units per point and the map is x points wide it should be a straight forward calculation?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think.....&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2012 03:40:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/calculating-scale-distance-from-map-resolution-and/m-p/324357#M2833</guid>
      <dc:creator>PaulDavis</dc:creator>
      <dc:date>2012-06-22T03:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Scale/Distance from Map Resolution and Map Width</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/calculating-scale-distance-from-map-resolution-and/m-p/324358#M2834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We use meters as our unit of measure.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I used a ruler tool in my app to measure the map width. 480&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The envelope width returned 480, so I didn't need any further calculations.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2012 10:54:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/calculating-scale-distance-from-map-resolution-and/m-p/324358#M2834</guid>
      <dc:creator>RickJones</dc:creator>
      <dc:date>2012-06-22T10:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Scale/Distance from Map Resolution and Map Width</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/calculating-scale-distance-from-map-resolution-and/m-p/324359#M2835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I initially calculated the distance from two lat/long points using other built in functions then saw that there were the extra properties on the map that you could use. I get the same result from both methods but when I compared the distance to a measurement taken in the arcgis iPad app for the same locations it's different. In one example my measurement was 2.9km but it was 2.3km in arcgis.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll keep looking...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2012 11:25:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/calculating-scale-distance-from-map-resolution-and/m-p/324359#M2835</guid>
      <dc:creator>PaulDavis</dc:creator>
      <dc:date>2012-06-22T11:25:38Z</dc:date>
    </item>
  </channel>
</rss>

