<?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 Value does not fall within expected range in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/value-does-not-fall-within-expected-range/m-p/645062#M8003</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use Arcgis runtime for net 100.2 and create C#/WPF application.&lt;/P&gt;&lt;P&gt;I developed custom circle (code of circle is) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;double slice = 2 * Math.PI / 360;&lt;BR /&gt; Esri.ArcGISRuntime.Geometry.PointCollection pcol = new Esri.ArcGISRuntime.Geometry.PointCollection();&lt;BR /&gt; Polyline polyline = new Polyline(points_Circle);&lt;BR /&gt; double radius = Convert.ToDouble(GeometryEngine.Length(polyline));&lt;BR /&gt; double sliceRadius = 0.07;&lt;BR /&gt; double radian = Math.Acos((radius - sliceRadius) / radius);&lt;BR /&gt; double angle = radian * (180 / Math.PI);&lt;BR /&gt; //Calcuate tendon&lt;BR /&gt; double tendon = radius * Math.Sin(angle);&lt;BR /&gt; if (tendon &amp;lt; 0.1)&lt;BR /&gt; {&lt;BR /&gt; tendon = 0.1;&lt;BR /&gt; angle = Math.Asin(0.1 /radius);&lt;BR /&gt; }&lt;BR /&gt; for (double i = 0; i &amp;lt;= 360; i += angle)&lt;BR /&gt; {&lt;BR /&gt; double rad = slice * i;&lt;BR /&gt; double px = points_Circle[0].X + radius * Math.Cos(rad);&lt;BR /&gt; double py = points_Circle[0].Y + radius * Math.Sin(rad);&lt;BR /&gt; pcol.Add(new MapPoint(px, py));&lt;BR /&gt; }&lt;BR /&gt; Polyline p = new Polyline(pcol);&lt;BR /&gt; // Create the graphic with polyline and symbol&lt;BR /&gt; Graphic graphicPoly = new Graphic(p, lineSymbol);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Image of circle is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/430461_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When intersect this circle with rectangle (code of rectangle is):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; var rectangle = await MyMapView.SketchEditor.StartAsync(SketchCreationMode.Rectangle, false);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;appear next message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/430460_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to solved this problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Nov 2018 22:06:32 GMT</pubDate>
    <dc:creator>KiroAndreev1</dc:creator>
    <dc:date>2018-11-28T22:06:32Z</dc:date>
    <item>
      <title>Value does not fall within expected range</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/value-does-not-fall-within-expected-range/m-p/645062#M8003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use Arcgis runtime for net 100.2 and create C#/WPF application.&lt;/P&gt;&lt;P&gt;I developed custom circle (code of circle is) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;double slice = 2 * Math.PI / 360;&lt;BR /&gt; Esri.ArcGISRuntime.Geometry.PointCollection pcol = new Esri.ArcGISRuntime.Geometry.PointCollection();&lt;BR /&gt; Polyline polyline = new Polyline(points_Circle);&lt;BR /&gt; double radius = Convert.ToDouble(GeometryEngine.Length(polyline));&lt;BR /&gt; double sliceRadius = 0.07;&lt;BR /&gt; double radian = Math.Acos((radius - sliceRadius) / radius);&lt;BR /&gt; double angle = radian * (180 / Math.PI);&lt;BR /&gt; //Calcuate tendon&lt;BR /&gt; double tendon = radius * Math.Sin(angle);&lt;BR /&gt; if (tendon &amp;lt; 0.1)&lt;BR /&gt; {&lt;BR /&gt; tendon = 0.1;&lt;BR /&gt; angle = Math.Asin(0.1 /radius);&lt;BR /&gt; }&lt;BR /&gt; for (double i = 0; i &amp;lt;= 360; i += angle)&lt;BR /&gt; {&lt;BR /&gt; double rad = slice * i;&lt;BR /&gt; double px = points_Circle[0].X + radius * Math.Cos(rad);&lt;BR /&gt; double py = points_Circle[0].Y + radius * Math.Sin(rad);&lt;BR /&gt; pcol.Add(new MapPoint(px, py));&lt;BR /&gt; }&lt;BR /&gt; Polyline p = new Polyline(pcol);&lt;BR /&gt; // Create the graphic with polyline and symbol&lt;BR /&gt; Graphic graphicPoly = new Graphic(p, lineSymbol);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Image of circle is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/430461_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When intersect this circle with rectangle (code of rectangle is):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; var rectangle = await MyMapView.SketchEditor.StartAsync(SketchCreationMode.Rectangle, false);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;appear next message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/430460_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to solved this problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2018 22:06:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/value-does-not-fall-within-expected-range/m-p/645062#M8003</guid>
      <dc:creator>KiroAndreev1</dc:creator>
      <dc:date>2018-11-28T22:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: Value does not fall within expected range</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/value-does-not-fall-within-expected-range/m-p/645063#M8004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't see you ever assigning a spatial reference to the geometries. Does the problem go away if you assign the correct spatial reference?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2018 22:51:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/value-does-not-fall-within-expected-range/m-p/645063#M8004</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2018-11-28T22:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: Value does not fall within expected range</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/value-does-not-fall-within-expected-range/m-p/645064#M8005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Morten,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I put spatial reference "&lt;SPAN&gt;SpatialReferences.WebMercator&lt;/SPAN&gt;" into:&lt;/P&gt;&lt;P&gt;&amp;nbsp;Esri.ArcGISRuntime.Geometry.PointCollection pcol = new Esri.ArcGISRuntime.Geometry.PointCollection(SpatialReferences.WebMercator);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and solved problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2018 23:45:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/value-does-not-fall-within-expected-range/m-p/645064#M8005</guid>
      <dc:creator>KiroAndreev1</dc:creator>
      <dc:date>2018-11-28T23:45:18Z</dc:date>
    </item>
  </channel>
</rss>

