<?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 Radius of a circle drawn as a polygon in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116097#M1103</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found this solution to draw a circle as a polygon of 360 points:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-(AGSPolygon*) circleWithCenter:(AGSPoint*)point raduis:(double)radius&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSMutablePolygon * p = [AGSMutablePolygon new];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [p addRingToPolygon];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int pointsCount = 360;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; double slice = 2 * M_PI / pointsCount;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(int i = 0; i&amp;lt;pointsCount;i++){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; double rad = slice * i;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; double px = point.x + radius * cos(rad);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; double py = point.y + radius * sin(rad);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [p addPointToRing:[AGSPoint pointWithX:px y:py spatialReference:[AGSSpatialReference spatialReferenceWithWKID:4326]]];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return p;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The question I have is what is the units of the radius passed in? For example, if I want to draw a circle of raduis 10 miles, what value do I pass in? If I pass in 10, it just draws a really huge circle with radius several multiples of 10!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to look into the sdk api docs and could not find much info, so any help will be appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Aug 2013 18:10:35 GMT</pubDate>
    <dc:creator>KunalMehta</dc:creator>
    <dc:date>2013-08-05T18:10:35Z</dc:date>
    <item>
      <title>Radius of a circle drawn as a polygon</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116097#M1103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found this solution to draw a circle as a polygon of 360 points:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-(AGSPolygon*) circleWithCenter:(AGSPoint*)point raduis:(double)radius&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSMutablePolygon * p = [AGSMutablePolygon new];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [p addRingToPolygon];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int pointsCount = 360;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; double slice = 2 * M_PI / pointsCount;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(int i = 0; i&amp;lt;pointsCount;i++){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; double rad = slice * i;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; double px = point.x + radius * cos(rad);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; double py = point.y + radius * sin(rad);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [p addPointToRing:[AGSPoint pointWithX:px y:py spatialReference:[AGSSpatialReference spatialReferenceWithWKID:4326]]];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return p;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The question I have is what is the units of the radius passed in? For example, if I want to draw a circle of raduis 10 miles, what value do I pass in? If I pass in 10, it just draws a really huge circle with radius several multiples of 10!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to look into the sdk api docs and could not find much info, so any help will be appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Aug 2013 18:10:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116097#M1103</guid>
      <dc:creator>KunalMehta</dc:creator>
      <dc:date>2013-08-05T18:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: Radius of a circle drawn as a polygon</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116098#M1104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Since you're using the WGS84 spatial reference, the value 10 is assumed to be in decimal degrees.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;At the equator, 1 degree = 69 miles (approx).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So if you want 10 miles, you should use 10/69 as radius&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2013 19:03:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116098#M1104</guid>
      <dc:creator>DiveshGoyal</dc:creator>
      <dc:date>2013-08-06T19:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Radius of a circle drawn as a polygon</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116099#M1105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The units will be decimal degrees.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What you might find useful is to buffer around your center-point.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
-(AGSPolygon*) circleWithCenter:(AGSPoint*)point radius:(double)radiusInMiles
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSGeometryEngine *ge = [AGSGeometryEngine defaultGeometryEngine];

&amp;nbsp;&amp;nbsp;&amp;nbsp; // Get a point in a spatial reference whose unit is Meters.
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSPoint *pointToBufferAround = (AGSPoint *)[ge projectGeometry:point toSpatialReference:[AGSSpatialReference webMercatorSpatialReference]];

&amp;nbsp;&amp;nbsp;&amp;nbsp; // Get a "circle" around it, using the unit Meters (1 mile ~= 1609.344 meters).
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSPolygon *circle = [ge bufferGeometry:pointToBufferAround byDistance:radiusInMiles*1609.344];

&amp;nbsp;&amp;nbsp;&amp;nbsp; // Project the output back to the projection of the input point (which is presumably what you're after).
&amp;nbsp;&amp;nbsp;&amp;nbsp; circle = (AGSPolygon *)[ge projectGeometry:circle toSpatialReference:point.spatialReference];

&amp;nbsp;&amp;nbsp;&amp;nbsp; return circle;
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That will use Meters (WebMercator's units). Note that your output may not be what you expect as the input or output approaches the poles. Also, there's no guarantee how many points the output polygon will have in its boundary.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:50:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116099#M1105</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2021-12-11T06:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Radius of a circle drawn as a polygon</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116100#M1106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks nfurness and Technobrat for your solutions. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Both work, however, per nfurness's solution using buffer around the center point and webMercatorSpatialReference, I am getting an oval shape rather than a circle. Is this expected?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2013 19:40:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116100#M1106</guid>
      <dc:creator>KunalMehta</dc:creator>
      <dc:date>2013-08-06T19:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: Radius of a circle drawn as a polygon</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116101#M1107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Could be. Depends on what the projection is of your map. I'm guessing it's not Web Mercator &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My solution will generate you a polygon that is pretty close to circular on the ground (i.e the edge is R miles north and R miles east of the center). If you are using a Web Mercator projection, it will appear circular on the map. If you are using WGS84 for example, it will indeed appear less tall as you move north or south from the equator, by virtue of the projection.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want something that looks circular on a WGS84 map, and you know that your center point is WGS84, you can either use your &amp;amp; Technobrat's solution or something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
-(AGSPolygon*) circleWithCenter:(AGSPoint*)point radius:(double)radiusInMiles
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSGeometryEngine *ge = [AGSGeometryEngine defaultGeometryEngine];

&amp;nbsp;&amp;nbsp;&amp;nbsp; // Get a "circle" around the point, using the 1 decimal degree ~= 69 miles.
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSPolygon *circle = [ge bufferGeometry:point byDistance:radiusInMiles/69];

&amp;nbsp;&amp;nbsp;&amp;nbsp; return circle;
}&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But remember that this is approximating the conversion between decimal degrees and meters, which is not constant for longitude as latitude varies.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, it really depends on what you are generating the 10 mile radius geometry for and (in short) how far north or south of the equator. Your solution may be good enough for what you want, but bear in mind that a degree of &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;longitude&lt;/SPAN&gt;&lt;SPAN&gt; will be very much less than 69 miles as you approach the poles. On the other hand, your application users may keep asking you why the "circle" is elliptical, and that might be a bigger headache than considering some things that might be more than 10 miles away.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:50:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116101#M1107</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2021-12-11T06:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Radius of a circle drawn as a polygon</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116102#M1108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How do I go about adding this to a graphics layer?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2014 14:02:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116102#M1108</guid>
      <dc:creator>SjorsProvoost</dc:creator>
      <dc:date>2014-06-12T14:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Radius of a circle drawn as a polygon</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116103#M1109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can add this to a graphics layer by converting it into a &lt;SPAN class="s1"&gt;AGSGraphic object. &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Something like below code will help for that:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;[&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;self&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;.&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;graphicsLayer&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;&lt;SPAN class="s4"&gt;addGraphic&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;:&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;[&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;AGSGraphic&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;graphicWithGeometry: &lt;/SPAN&gt;&lt;SPAN class="s1"&gt;[&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;self&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;circleWithCenter&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;:point &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;radius&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;:10&lt;/SPAN&gt;&lt;SPAN class="s5"&gt;.0f&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;] &lt;/SPAN&gt;&lt;SPAN class="s6"&gt;symbol&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;:&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;[&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;AGSSimpleLineSymbol&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;simpleLineSymbol&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;] &lt;/SPAN&gt;&lt;SPAN class="s6"&gt;attributes&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;:&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;nil&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;]];&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Feb 2016 20:46:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116103#M1109</guid>
      <dc:creator>AkhilChoran_Balan</dc:creator>
      <dc:date>2016-02-24T20:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: Radius of a circle drawn as a polygon</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116104#M1110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can i get the solution for arcgis javascript api for same?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 04:51:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116104#M1110</guid>
      <dc:creator>FancyAugustin</dc:creator>
      <dc:date>2017-06-14T04:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: Radius of a circle drawn as a polygon</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116105#M1111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do the same thing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the JavaScript GeometryEngine. See&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicBuffer" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicBuffer"&gt;geometryEngine GeodesicBuffer&lt;/A&gt;&amp;nbsp;which will give you a circular polygon&amp;nbsp;back around the center &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html"&gt;point&lt;/A&gt;, and you can then use &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html"&gt;Graphic&lt;/A&gt; and &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html"&gt;GraphicsLayer&lt;/A&gt; to add these to your &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#graphics"&gt;MapView&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 05:04:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116105#M1111</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2017-06-14T05:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: Radius of a circle drawn as a polygon</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116106#M1112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry i didnt get you.The code below is used for drawing circle and polygon.From this how can we get the radius of the circle which we draw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;require([&lt;BR /&gt; "esri/map", "esri/toolbars/draw",&lt;BR /&gt; "esri/symbols/SimpleMarkerSymbol", "esri/symbols/SimpleLineSymbol",&lt;BR /&gt; "esri/symbols/SimpleFillSymbol", "esri/geometry/webMercatorUtils", "esri/symbols/CartographicLineSymbol",&lt;BR /&gt; "esri/graphic",&lt;BR /&gt; "esri/Color", "dojo/dom", "dojo/on", "dojo/domReady!"&lt;BR /&gt;], function(&lt;BR /&gt; Map, Draw,&lt;BR /&gt; SimpleMarkerSymbol, SimpleLineSymbol,&lt;BR /&gt; SimpleFillSymbol, WebMercatorUtils, CartographicLineSymbol,&lt;BR /&gt; Graphic,&lt;BR /&gt; Color, dom, on&lt;BR /&gt; ) {&lt;BR /&gt; var circleArray = [];&lt;BR /&gt; map = new Map("mapDiv", {&lt;BR /&gt; basemap: "streets",&lt;BR /&gt; center: [-148.6234374999831, 62.10143229517362],&lt;BR /&gt; zoom: 3&lt;BR /&gt; });&lt;BR /&gt; map.on("load", initToolbar);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; // fill symbol used for extent, polygon and freehand polygon, use a picture fill symbol&lt;BR /&gt; // the images folder contains additional fill images, other options: sand.png, swamp.png or stiple.png&lt;BR /&gt; var fillSymbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID,&lt;BR /&gt; new SimpleLineSymbol(SimpleLineSymbol.STYLE_DASH,&lt;BR /&gt; new Color([255, 0, 0]), 2), new Color([255, 255, 0, 0.25])&lt;BR /&gt; );&lt;/P&gt;&lt;P&gt;function initToolbar() {&lt;BR /&gt; tb = new Draw(map);&lt;BR /&gt; tb.on("draw-end", addGraphic);&lt;/P&gt;&lt;P&gt;// event delegation so a click handler is not&lt;BR /&gt; // needed for each individual button&lt;BR /&gt; on(dom.byId("info"), "click", function(evt) {&lt;BR /&gt; if (evt.target.id === "info") {&lt;BR /&gt; return;&lt;BR /&gt; }&lt;BR /&gt; var tool = evt.target.id.toLowerCase();&lt;BR /&gt; map.disableMapNavigation();&lt;BR /&gt; tb.activate(tool);&lt;BR /&gt; });&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;function postGraphic(geometry) {&lt;BR /&gt; $("#vertices").text("");&lt;/P&gt;&lt;P&gt;if (geometry.type === 'polygon') {&lt;BR /&gt; //Our polygons should have only one ring&lt;/P&gt;&lt;P&gt;var polygon = geometry.rings[0];&lt;BR /&gt; var vertices = "";&lt;/P&gt;&lt;P&gt;var latLong = [];&lt;BR /&gt; for (var i = 0; i &amp;lt; polygon.length; i++) {&lt;BR /&gt; if (geometry.spatialReference.isWebMercator()) {&lt;BR /&gt; //Convert to traditional decimal degrees&lt;BR /&gt; longLat = WebMercatorUtils.xyToLngLat(polygon&lt;I&gt;[0], polygon&lt;I&gt;[1]);&lt;BR /&gt; } else&lt;BR /&gt; longLat = [polygon&lt;I&gt;[0], polygon&lt;I&gt;[1]];&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;x = longLat[0];&lt;BR /&gt; y = longLat[1];&lt;BR /&gt; var objLatLong = {};&lt;BR /&gt; objLatLong.long = longLat[0];&lt;BR /&gt; objLatLong.lat = longLat[1];&lt;BR /&gt; latLong.push(objLatLong)&lt;/P&gt;&lt;P&gt;//Convert the vertices to the format x,y;x,y;&lt;BR /&gt; vertices = vertices + x + ',' + y + ';';&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; $("#vertices").text(vertices);&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; var circleFlag = false;&lt;BR /&gt; var polygonFlag = false;&lt;BR /&gt; $('#Circle').on("click", function() {&lt;BR /&gt; circleFlag = true;&lt;BR /&gt; polygonFlag = false;&lt;BR /&gt; })&lt;BR /&gt; ;&lt;BR /&gt; $('#Polygon').on("click", function() {&lt;BR /&gt; circleFlag = false;&lt;BR /&gt; polygonFlag = true;&lt;BR /&gt; })&lt;BR /&gt; ;&lt;BR /&gt; function addGraphic(evt) {&lt;BR /&gt; //deactivate the toolbar and clear existing graphics &lt;BR /&gt; tb.deactivate();&lt;BR /&gt; map.enableMapNavigation();&lt;/P&gt;&lt;P&gt;// figure out which symbol to use&lt;BR /&gt; var symbol;&lt;/P&gt;&lt;P&gt;symbol = fillSymbol;&lt;BR /&gt; var graphic = new Graphic(evt.geometry, symbol);&lt;BR /&gt; map.graphics.add(graphic);&lt;BR /&gt; postGraphic(evt.geometry);&lt;BR /&gt; }&lt;BR /&gt;});&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 08:16:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116106#M1112</guid>
      <dc:creator>FancyAugustin</dc:creator>
      <dc:date>2017-06-14T08:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Radius of a circle drawn as a polygon</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116107#M1113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah. That's a very different question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should use &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/polygon-amd.html#getcentroid"&gt;Polygon.getCentroid()&lt;/A&gt; to get the centerpoint of the circle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/polygon-amd.html#getpoint"&gt;Polygon.getPoint(0,0)&lt;/A&gt; to get a &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/point-amd.html"&gt;Point&lt;/A&gt; from the circle and use &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/esri.geometry.geometryengine-amd.html#distance"&gt;geometryEngine.distance()&lt;/A&gt;&amp;nbsp;between the two points to determine the radius.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That assumes you used the Draw.CIRCLE&amp;nbsp;type when you call &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/draw-amd.html#activate"&gt;draw.activate()&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note&amp;nbsp;that you appear to be using the &lt;STRONG&gt;draw-end&lt;/STRONG&gt; event and it seems that is deprecated in favor of the &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/draw-amd.html#event-draw-complete"&gt;draw-complete&lt;/A&gt; event.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 12:44:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116107#M1113</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2017-06-14T12:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: Radius of a circle drawn as a polygon</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116108#M1114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp;this was really useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one more clarification.&lt;/P&gt;&lt;P&gt;I saw the below format in tutorial:&lt;/P&gt;&lt;H4 class="" style="color: #4d4d4d; background-color: #ffffff; font-weight: 500; font-size: 1.0625em; margin: 0.2em 0px 0.4em;"&gt;distance(geometry1, geometry2, distanceUnit)&lt;/H4&gt;&lt;P&gt;geometry.getPoint(0,0)&lt;BR /&gt;Object {type: "point", x: -15849192.693999259, y: 10478016.378614787, spatialReference: Object}&lt;BR /&gt;geometry.getCentroid()&lt;BR /&gt;Object {type: "point", x: -18090547.842482734, y: 10478016.37861477, spatialReference: Object}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i proceed with distance function.Sorry i am new to esri map? Can you please clarify this too?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 12:54:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116108#M1114</guid>
      <dc:creator>FancyAugustin</dc:creator>
      <dc:date>2017-06-14T12:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Radius of a circle drawn as a polygon</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116109#M1115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;. The following&amp;nbsp;should get you the radius in meters:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; radius &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; geometryEngine&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;distance&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getCentroid&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getPoint&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"meters"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 12:59:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116109#M1115</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2017-06-14T12:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: Radius of a circle drawn as a polygon</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116110#M1116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When i try to add&amp;nbsp;&lt;/P&gt;&lt;PRE class="" style="color: #4d4d4d; background: #fafafa; border: 2px solid #dddddd; padding: 0.5em 0px 0.5em 0.5em;"&gt;&lt;SPAN class="" style="color: #dd1144;"&gt;esri/geometry/geometryEngine &lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;under require in the which i posted before ,it is giving me error saying &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Uncaught ReferenceError: require is not defined&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Can i get your help on this?&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 13:07:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116110#M1116</guid>
      <dc:creator>FancyAugustin</dc:creator>
      <dc:date>2017-06-14T13:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: Radius of a circle drawn as a polygon</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116111#M1117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Probably best to post a question like that over on the&amp;nbsp;&lt;A href="https://community.esri.com/space/2128"&gt;ArcGIS API for JavaScript&lt;/A&gt;&amp;nbsp;space. But if your previous require statement worked, this will work too. Since you're getting started with the APIs, perhaps take a look at the Develop sections of the &lt;A href="https://developers.arcgis.com/labs/"&gt;DevLabs&lt;/A&gt;&amp;nbsp;and&amp;nbsp;&lt;A href="https://github.com/Esri/geodev-hackerlabs"&gt;Hackerlabs&lt;/A&gt; (including the &lt;A href="https://github.com/Esri/geodev-hackerlabs/blob/gh-pages/develop/jsapi3/README.md"&gt;3.x labs&lt;/A&gt;).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 13:14:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116111#M1117</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2017-06-14T13:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Radius of a circle drawn as a polygon</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116112#M1118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Really sorry that was issue in network.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #881391;"&gt;radius&lt;/SPAN&gt;&lt;SPAN class="" style="color: #212121; padding-right: 5px;"&gt;:&lt;SPAN style="color: #222222;"&gt;1927212.6012732424&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #1c00cf;"&gt;The above radius i got when executed that code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #1c00cf;"&gt;But is this valid value,i doubt that?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 13:46:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/radius-of-a-circle-drawn-as-a-polygon/m-p/116112#M1118</guid>
      <dc:creator>FancyAugustin</dc:creator>
      <dc:date>2017-06-14T13:46:28Z</dc:date>
    </item>
  </channel>
</rss>

