<?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: Drawing an AGSMutablePolyline through the 24-hour line in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/drawing-an-agsmutablepolyline-through-the-24-hour/m-p/718564#M6406</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Divesh, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am now using the following according to your instructions but cannot see a polyline across the dateline as expected:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
AGSPoint *aucklandmappoint =[[AGSPoint alloc] initWithX:aucklandMecPoint.x y:aucklandMecPoint.y spatialReference:[AGSSpatialReference spatialReferenceWithWKID:4326]];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSPoint *losangelesmappoint =[[AGSPoint alloc] initWithX:losangelesMecPoint.x y:losangelesMecPoint.y spatialReference:[AGSSpatialReference spatialReferenceWithWKID:4326] ];&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; [self.graphicsLayer removeAllGraphics]; 

&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSMutablePolyline *polyline = [[AGSMutablePolyline alloc] initWithSpatialReference:[AGSSpatialReference spatialReferenceWithWKID:4326]]; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; [polyline addPathToPolyline]; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; [polyline addPointToPath:losangelesmappoint];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; [polyline addPointToPath:aucklandmappoint];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; polyline = (AGSMutablePolyline *)[[AGSGeometryEngine defaultGeometryEngine]normalizeCentralMeridianOfGeometry:polyline];&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSGraphic *poly = [[AGSGraphic alloc] initWithGeometry:polyline symbol:[AGSSimpleLineSymbol simpleLineSymbolWithColor:[UIColor blackColor]] attributes:nil infoTemplateDelegate:nil];&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; [self.graphicsLayer addGraphic:poly]; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; [poly release]; &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 06:46:09 GMT</pubDate>
    <dc:creator>GW</dc:creator>
    <dc:date>2021-12-12T06:46:09Z</dc:date>
    <item>
      <title>Drawing an AGSMutablePolyline through the 24-hour line</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/drawing-an-agsmutablepolyline-through-the-24-hour/m-p/718558#M6400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi there, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There does not seem to be any support for that. I see there is an &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/28506-how-to-build-the-polyline-where-Points-crosses-the-international-dateline"&gt;option&lt;/A&gt;&lt;SPAN&gt; for the ArcGIS API for Flex (through normalization of the Central Meridian. What's out there for iOS? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks !&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 08:39:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/drawing-an-agsmutablepolyline-through-the-24-hour/m-p/718558#M6400</guid>
      <dc:creator>GW</dc:creator>
      <dc:date>2011-10-25T08:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing an AGSMutablePolyline through the 24-hour line</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/drawing-an-agsmutablepolyline-through-the-24-hour/m-p/718559#M6401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The AGSGeometryEngine class has a similar method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For more information about wrap-around, refer to &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgismobile/10.0/apis/iOS/2.0/concepts/index.html#/Enabling_Wrap_Around/00pw00000050000000/"&gt;http://help.arcgis.com/en/arcgismobile/10.0/apis/iOS/2.0/concepts/index.html#/Enabling_Wrap_Around/00pw00000050000000/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Oct 2011 13:54:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/drawing-an-agsmutablepolyline-through-the-24-hour/m-p/718559#M6401</guid>
      <dc:creator>DiveshGoyal</dc:creator>
      <dc:date>2011-10-26T13:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing an AGSMutablePolyline through the 24-hour line</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/drawing-an-agsmutablepolyline-through-the-24-hour/m-p/718560#M6402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the tip. I have tried using that, and without examples it's pretty difficult to make sense out of it. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any sample using that? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Oct 2011 21:30:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/drawing-an-agsmutablepolyline-through-the-24-hour/m-p/718560#M6402</guid>
      <dc:creator>GW</dc:creator>
      <dc:date>2011-10-26T21:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing an AGSMutablePolyline through the 24-hour line</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/drawing-an-agsmutablepolyline-through-the-24-hour/m-p/718561#M6403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;anyone for this question?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2011 08:08:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/drawing-an-agsmutablepolyline-through-the-24-hour/m-p/718561#M6403</guid>
      <dc:creator>GW</dc:creator>
      <dc:date>2011-11-02T08:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing an AGSMutablePolyline through the 24-hour line</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/drawing-an-agsmutablepolyline-through-the-24-hour/m-p/718562#M6404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;With this code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSPoint *aucklandmappoint =[[AGSPoint alloc] initWithX:aucklandMecPoint.x y:aucklandMecPoint.y spatialReference:[AGSSpatialReference spatialReferenceWithWKID:4326]];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSPoint *losangelesmappoint =[[AGSPoint alloc] initWithX:losangelesMecPoint.x y:losangelesMecPoint.y spatialReference:[AGSSpatialReference spatialReferenceWithWKID:4326] ];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; [self.graphicsLayer removeAllGraphics]; 

&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSMutablePolyline *polyline = [[AGSMutablePolyline alloc] initWithSpatialReference:[AGSSpatialReference spatialReferenceWithWKID:4326]]; 

&amp;nbsp;&amp;nbsp;&amp;nbsp; [polyline addPathToPolyline]; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; [polyline addPointToPath:losangelesmappoint];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; [polyline addPointToPath:aucklandmappoint];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 

&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSGraphic *poly = [[AGSGraphic alloc] initWithGeometry:polyline symbol:[AGSSimpleLineSymbol simpleLineSymbolWithColor:[UIColor blackColor]] attributes:nil infoTemplateDelegate:nil];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; [self.graphicsLayer addGraphic:poly]; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; [poly release];&amp;nbsp; 
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I get: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;IMG src="http://forums.arcgis.com/attachment.php?attachmentid=9905&amp;amp;stc=1&amp;amp;d=1320320340" /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I use &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;normalizeCentralMeridianOfGeometry&lt;/SPAN&gt;&lt;SPAN&gt; on the polyline:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSPoint *aucklandmappoint =[[AGSPoint alloc] initWithX:aucklandMecPoint.x y:aucklandMecPoint.y spatialReference:[AGSSpatialReference spatialReferenceWithWKID:4326]];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSPoint *losangelesmappoint =[[AGSPoint alloc] initWithX:losangelesMecPoint.x y:losangelesMecPoint.y spatialReference:[AGSSpatialReference spatialReferenceWithWKID:4326] ];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; [self.graphicsLayer removeAllGraphics]; 

&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSMutablePolyline *polyline = [[AGSMutablePolyline alloc] initWithSpatialReference:[AGSSpatialReference spatialReferenceWithWKID:4326]]; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; polyline = (AGSMutablePolyline *)[[AGSGeometryEngine defaultGeometryEngine]normalizeCentralMeridianOfGeometry:polyline];

&amp;nbsp;&amp;nbsp;&amp;nbsp; [polyline addPathToPolyline]; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; [polyline addPointToPath:losangelesmappoint];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; [polyline addPointToPath:aucklandmappoint];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 

&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSGraphic *poly = [[AGSGraphic alloc] initWithGeometry:polyline symbol:[AGSSimpleLineSymbol simpleLineSymbolWithColor:[UIColor blackColor]] attributes:nil infoTemplateDelegate:nil];&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; poly.geometry = [[AGSGeometryEngine defaultGeometryEngine]normalizeCentralMeridianOfGeometry:poly.geometry];&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; [self.graphicsLayer addGraphic:poly]; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; [poly release];&amp;nbsp; 
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I get:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;IMG src="http://forums.arcgis.com/attachment.php?attachmentid=9904&amp;amp;stc=1&amp;amp;d=1320320210" /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note: wrap around is enabled&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self._mapView.wrapAround = YES;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:46:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/drawing-an-agsmutablepolyline-through-the-24-hour/m-p/718562#M6404</guid>
      <dc:creator>GW</dc:creator>
      <dc:date>2021-12-12T06:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing an AGSMutablePolyline through the 24-hour line</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/drawing-an-agsmutablepolyline-through-the-24-hour/m-p/718563#M6405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You have 2 calls to normalizeCentralMeridian, once when you instantiate a blank polyline, and the other after you have already assigned the polyline to a graphic. Both of these will have no affect. The first call does nothing because the polyline is empty. The second does infact normalize and return a new polyline, but your graphic is already set up with the original un-normalized polyline.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You need to call normalize after you add the last vertex to the polyline, and before you assign the polyline to the graphic.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Nov 2011 16:30:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/drawing-an-agsmutablepolyline-through-the-24-hour/m-p/718563#M6405</guid>
      <dc:creator>DiveshGoyal</dc:creator>
      <dc:date>2011-11-03T16:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing an AGSMutablePolyline through the 24-hour line</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/drawing-an-agsmutablepolyline-through-the-24-hour/m-p/718564#M6406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Divesh, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am now using the following according to your instructions but cannot see a polyline across the dateline as expected:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
AGSPoint *aucklandmappoint =[[AGSPoint alloc] initWithX:aucklandMecPoint.x y:aucklandMecPoint.y spatialReference:[AGSSpatialReference spatialReferenceWithWKID:4326]];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSPoint *losangelesmappoint =[[AGSPoint alloc] initWithX:losangelesMecPoint.x y:losangelesMecPoint.y spatialReference:[AGSSpatialReference spatialReferenceWithWKID:4326] ];&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; [self.graphicsLayer removeAllGraphics]; 

&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSMutablePolyline *polyline = [[AGSMutablePolyline alloc] initWithSpatialReference:[AGSSpatialReference spatialReferenceWithWKID:4326]]; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; [polyline addPathToPolyline]; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; [polyline addPointToPath:losangelesmappoint];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; [polyline addPointToPath:aucklandmappoint];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; polyline = (AGSMutablePolyline *)[[AGSGeometryEngine defaultGeometryEngine]normalizeCentralMeridianOfGeometry:polyline];&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSGraphic *poly = [[AGSGraphic alloc] initWithGeometry:polyline symbol:[AGSSimpleLineSymbol simpleLineSymbolWithColor:[UIColor blackColor]] attributes:nil infoTemplateDelegate:nil];&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; [self.graphicsLayer addGraphic:poly]; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; [poly release]; &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:46:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/drawing-an-agsmutablepolyline-through-the-24-hour/m-p/718564#M6406</guid>
      <dc:creator>GW</dc:creator>
      <dc:date>2021-12-12T06:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing an AGSMutablePolyline through the 24-hour line</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/drawing-an-agsmutablepolyline-through-the-24-hour/m-p/718565#M6407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Bump. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If this is a bug, where can I submit this?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Nov 2011 02:56:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/drawing-an-agsmutablepolyline-through-the-24-hour/m-p/718565#M6407</guid>
      <dc:creator>GW</dc:creator>
      <dc:date>2011-11-27T02:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing an AGSMutablePolyline through the 24-hour line</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/drawing-an-agsmutablepolyline-through-the-24-hour/m-p/718566#M6408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, I dug deeper in this. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It appeared that the map spatial reference I was using (based on the tiled layer) was not consistent with the graphics spatial reference. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; NSURL *mapUrl = [NSURL URLWithString:@"http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"];
 AGSTiledMapServiceLayer *tiledLyr = [AGSTiledMapServiceLayer tiledMapServiceLayerWithURL:mapUrl];&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(the spatial reference for this URL being 102100)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;is now paired with &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSMutablePolyline *polyline = [[AGSMutablePolyline alloc] initWithSpatialReference:[AGSSpatialReference spatialReferenceWithWKID:102100]]; &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Fixing this now always displays the polyline reglardless whether &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;normalizeCentralMeridianOfGeometry&lt;/SPAN&gt;&lt;SPAN&gt; is used or not. Now, even when using &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;normalizeCentralMeridianOfGeometry&lt;/SPAN&gt;&lt;SPAN&gt;, the polyline is always drawn so that it does not cross the dateline. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;IMG src="http://forums.arcgis.com/attachment.php?attachmentid=10411&amp;amp;d=1322649506" /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have modified the SketchLayerSample application to demonstrate this issue. It's attached to this post.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One last thing is when trying to show the mapview's spatial reference, I alway get a null back. As opposed to graphics used in the app. The sample attached also shows that.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:46:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/drawing-an-agsmutablepolyline-through-the-24-hour/m-p/718566#M6408</guid>
      <dc:creator>GW</dc:creator>
      <dc:date>2021-12-12T06:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing an AGSMutablePolyline through the 24-hour line</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/drawing-an-agsmutablepolyline-through-the-24-hour/m-p/718567#M6409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You really need to understand few things about wrap around and normalizing geometries. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Wrap around: &lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are two ways you can reach to Auckland from Los Angeles. One by crossing the date line (from [-118.2436849,34.0522342] to [-185.233,-36.8667]) and another without crossing the date line (from [-118.2436849,34.0522342] to [174.767,-36.8667]). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Without crossing the date line: You don't need the warp around since the geometry is not crossing the date line. See attached first image.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;By crossing the date line: If wrap around is not enabled then see how geometry looks (see 2nd image) and see 3rd image, how geometry looks when warp around is enabled.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Normalizing Geometries:&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What normalizeCentralMeridianOfGeometry does?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If the geometry is outside -180 and +180 then it cuts the geometry into parts and folds into -180 and +180. You do not need to USE this method if you are not intending to store these geometry in the geodatabase (either personal, file or see). If you just want to display them on the map then wrap around is enough.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For more information about wrap-around, refer to &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgismobile/10.0/apis/iOS/2.0/concepts/index.html#/Enabling_Wrap_Around/00pw00000050000000/"&gt;Wrap Around&lt;/A&gt;&lt;SPAN&gt; documentation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also added a switch to enable/disable wrap around so you can see the effect. See modifications I made in the your attached project.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;One last thing is when trying to show the mapview's spatial reference, I alway get a null back.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is because you are trying to check it too soon. You are adding the base layer in the viewDidLoad method and by the time you check the spatial reference of the mapView, the map is not loaded yet. You should check it in the mapViewDidLoad delegate method. See modifications in attached project.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One more thing, you are converting your WGS 1984 (4326) geometries into Web Mercator (102100) with your own function called lonLat2Mercator. The calculation seems to be incorrect. Please use the function AGSGeometryGeographicToWebMercator available in the SDK for the same. See code in attached project.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope, I made all points clear. Please let me know if you still have any question.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nimesh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2011 17:46:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/drawing-an-agsmutablepolyline-through-the-24-hour/m-p/718567#M6409</guid>
      <dc:creator>NimeshJarecha</dc:creator>
      <dc:date>2011-12-01T17:46:38Z</dc:date>
    </item>
  </channel>
</rss>

