<?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: GeometryService issues in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geometryservice-issues/m-p/606573#M15556</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sweet....that seems to have solved the issues I was having. I was not setting the spatial reference upon creating the graphics that I wanted to use as the input into the Geometry Service. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Mar 2011 22:24:46 GMT</pubDate>
    <dc:creator>JackCibor</dc:creator>
    <dc:date>2011-03-11T22:24:46Z</dc:date>
    <item>
      <title>GeometryService issues</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geometryservice-issues/m-p/606567#M15550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I recently switch my base maps from spatial reference 4326 to 102100, and of course all of my distance measuring tools broke.&amp;nbsp; I'm now trying to use a Geometry Service, but everything I try results in "Object reference not set to an instance of an object".&amp;nbsp; The graphic geometry is Polyline.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is all I'm trying to do:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;GeometryService geometryService = new GeometryService("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer" rel="nofollow" target="_blank"&gt;http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;geometryService.ProjectCompleted += GeometryService_ProjectCompleted;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;geometryService.Failed += GeometryService_Failed;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;List&amp;lt;Graphic&amp;gt; graphicList = new List&amp;lt;Graphic&amp;gt;();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;graphicList.Add(graphic);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;geometryService.ProjectAsync(graphicList, new SpatialReference(4326));&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any thoughts?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Aug 2010 14:39:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geometryservice-issues/m-p/606567#M15550</guid>
      <dc:creator>JasonKnisley</dc:creator>
      <dc:date>2010-08-16T14:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryService issues</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geometryservice-issues/m-p/606568#M15551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Where are you getting that null-ref exception? Do you have a stacktrace you can share?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Aug 2010 21:27:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geometryservice-issues/m-p/606568#M15551</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2010-08-16T21:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryService issues</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geometryservice-issues/m-p/606569#M15552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jason and Morten&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am getting the exact (line for line) problem while trying to reproject a point to 102100.&amp;nbsp; Did you find the answer for this??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, Gregg&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jan 2011 17:55:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geometryservice-issues/m-p/606569#M15552</guid>
      <dc:creator>GreggLanzing</dc:creator>
      <dc:date>2011-01-13T17:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryService issues</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geometryservice-issues/m-p/606570#M15553</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;have you verified that the geometry you are trying to project has a valid spatial reference set?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, as an alternative method of projecting the geometry there is this helper class that you can use &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Projection.WebMercator_members.html"&gt;http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Projection.WebMercator_members.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jan 2011 18:16:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geometryservice-issues/m-p/606570#M15553</guid>
      <dc:creator>DaveTimmins</dc:creator>
      <dc:date>2011-01-13T18:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryService issues</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geometryservice-issues/m-p/606571#M15554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;have you verified that the geometry you are trying to project has a valid spatial reference set?&lt;BR /&gt;&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How would you verify that your input geometry has a valid spatial reference set??&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 21:49:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geometryservice-issues/m-p/606571#M15554</guid>
      <dc:creator>JackCibor</dc:creator>
      <dc:date>2011-03-11T21:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryService issues</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geometryservice-issues/m-p/606572#M15555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The spatial reference of your input geometry can be found here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Graphic.Geometry.SpatialReference&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Check to make sure your SpatialRefence of your graphic you are trying to project is not null. I would say that it is null.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;GeometryService geometryService = new GeometryService("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer" rel="nofollow" target="_blank"&gt;http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; geometryService.ProjectCompleted += GeometryService_ProjectCompleted;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; geometryService.Failed += GeometryService_Failed;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;List&amp;lt;Graphic&amp;gt; graphicList = new List&amp;lt;Graphic&amp;gt;();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; graphicList.Add(graphic); &lt;/SPAN&gt;&lt;STRONG&gt;// &amp;lt;-- this graphic.Geometry.SpatialRefence is probably null&lt;BR /&gt;&lt;/STRONG&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;geometryService.ProjectAsync(graphicList, new SpatialReference(4326));&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is a client side Projection from 4326 to 102100 and back linked by Dave above that you can use to avoid sending data over the wire. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the link again &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Projection.WebMercator_members.html"&gt;http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Projection.WebMercator_members.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 22:07:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geometryservice-issues/m-p/606572#M15555</guid>
      <dc:creator>ChristopherHill</dc:creator>
      <dc:date>2011-03-11T22:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryService issues</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geometryservice-issues/m-p/606573#M15556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sweet....that seems to have solved the issues I was having. I was not setting the spatial reference upon creating the graphics that I wanted to use as the input into the Geometry Service. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 22:24:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geometryservice-issues/m-p/606573#M15556</guid>
      <dc:creator>JackCibor</dc:creator>
      <dc:date>2011-03-11T22:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryService issues</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geometryservice-issues/m-p/606574#M15557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yeah, thre graphics can contain geometry that do not have a spatial reference defined, the map will assume that the X and Y of each point is the same spatial reference as the map and if it is your graphics will appear correctlly even with missing spatial reference, but when you project them the spatial reference needs to be there in order for the service to know that its converting from A to B. in your case it was convert from Null to 4326 and the service threw an excepction.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 22:36:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/geometryservice-issues/m-p/606574#M15557</guid>
      <dc:creator>ChristopherHill</dc:creator>
      <dc:date>2011-03-11T22:36:08Z</dc:date>
    </item>
  </channel>
</rss>

