<?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: AGSGeometryEngine normalizeCentralMeridianOfGeometry does not work with cached la in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsgeometryengine/m-p/484885#M4147</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The normalizeCentralMeridianOfGeometry of AGSGeometryEngine works only if the geometry is either in WGS1984 (4326) or Web Mercator (102100, 3857 etc.). The JSON representation of popup.graphic.geometry while online is in Web Mercator (102100). Hence, it works. When you cache the feature the geometry has feature layers spatial reference (not WGS1984 or Web Mercator). Hence, you are getting the null geometry from normalizeCentralMeridianOfGeometry.&lt;BR /&gt;&lt;BR /&gt;Hope this helps!&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Nimesh&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Got it, thanks! I noticed someone else had a similar issue, so it might help to have the spatial reference requirements in the documentation.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Sep 2011 12:25:02 GMT</pubDate>
    <dc:creator>EddieJesinsky</dc:creator>
    <dc:date>2011-09-27T12:25:02Z</dc:date>
    <item>
      <title>AGSGeometryEngine normalizeCentralMeridianOfGeometry does not work with cached layer</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsgeometryengine/m-p/484883#M4145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Example usage of this is in the FeatureLayerEditing sample and the OnlineOfflineEditing sample:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I noticed today that after caching a layer (and then loading it from JSON), I was getting null geometries when calling AGSGeometryEngine's normalizeCentralMeridianOfGeometry on anything.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example (taken from FeatureLayerEditingSample):&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
popup.graphic.geometry = [[AGSGeometryEngine defaultGeometryEngine]simplifyGeometry:popup.graphic.geometry];
popup.graphic.geometry = [[AGSGeometryEngine defaultGeometryEngine]normalizeCentralMeridianOfGeometry:popup.graphic.geometry];
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This code works fine when online, but when loading from JSON, the second line gets null geometry.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I got around it by just taking out the second line, but if anyone knows what is causing it I'd appreciate it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's the json representation of popup.graphic.geometry while it is online:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
{"x":-8936932.302947983,"y":4691798.109359831,"spatialReference":{"wkid":102100}}
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's the json representation of popup.graphic.geometry after it is cached:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
{"x":562370.4708862299,"y":4293844.423522947,"spatialReference":{"wkt":"PROJCS[\"NAD_1983_UTM_Zone_17N\",GEOGCS[\"GCS_North_American_1983\",DATUM[\"D_North_American_1983\",SPHEROID[\"GRS_1980\",6378137.0,298.257222101]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_Easting\",500000.0],PARAMETER[\"False_Northing\",0.0],PARAMETER[\"Central_Meridian\",-81.0],PARAMETER[\"Scale_Factor\",0.9996],PARAMETER[\"Latitude_Of_Origin\",0.0],UNIT[\"Meter\",1.0],AUTHORITY[\"EPSG\",26917]]","wkid":26917}}
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also would like to know why the json representation changes so drastically when loaded offline?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Sep 2011 18:51:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsgeometryengine/m-p/484883#M4145</guid>
      <dc:creator>EddieJesinsky</dc:creator>
      <dc:date>2011-09-26T18:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: AGSGeometryEngine normalizeCentralMeridianOfGeometry does not work with cached la</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsgeometryengine/m-p/484884#M4146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The normalizeCentralMeridianOfGeometry of AGSGeometryEngine works only if the geometry is either in WGS1984 (4326) or Web Mercator (102100, 3857 etc.). The JSON representation of popup.graphic.geometry while online is in Web Mercator (102100). Hence, it works. When you cache the feature the geometry has feature layers spatial reference (not WGS1984 or Web Mercator). Hence, you are getting the null geometry from normalizeCentralMeridianOfGeometry.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps!&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>Mon, 26 Sep 2011 20:52:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsgeometryengine/m-p/484884#M4146</guid>
      <dc:creator>NimeshJarecha</dc:creator>
      <dc:date>2011-09-26T20:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: AGSGeometryEngine normalizeCentralMeridianOfGeometry does not work with cached la</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsgeometryengine/m-p/484885#M4147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The normalizeCentralMeridianOfGeometry of AGSGeometryEngine works only if the geometry is either in WGS1984 (4326) or Web Mercator (102100, 3857 etc.). The JSON representation of popup.graphic.geometry while online is in Web Mercator (102100). Hence, it works. When you cache the feature the geometry has feature layers spatial reference (not WGS1984 or Web Mercator). Hence, you are getting the null geometry from normalizeCentralMeridianOfGeometry.&lt;BR /&gt;&lt;BR /&gt;Hope this helps!&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Nimesh&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Got it, thanks! I noticed someone else had a similar issue, so it might help to have the spatial reference requirements in the documentation.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 12:25:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsgeometryengine/m-p/484885#M4147</guid>
      <dc:creator>EddieJesinsky</dc:creator>
      <dc:date>2011-09-27T12:25:02Z</dc:date>
    </item>
  </channel>
</rss>

