<?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: Selected Feature Geometry error for a zoom to selected functionality in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/selected-feature-geometry-error-for-a-zoom-to/m-p/726536#M3499</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi...I set ReturnGeometry=true, but it doesn't work too. my toolkit version is 1.2, is your toolkit version 2.1?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; I had this problem again and I found that in the mxd you use to create your webservice, if you turn off the shape column of the layers you run the query on, selectedfeature.geometry comes back as null. Keep the shape column on if you are doing anything with geometry.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also make sure you have Geometry service running on your web server.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Dec 2011 18:19:12 GMT</pubDate>
    <dc:creator>DeeptiVB</dc:creator>
    <dc:date>2011-12-02T18:19:12Z</dc:date>
    <item>
      <title>Selected Feature Geometry error for a zoom to selected functionality</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/selected-feature-geometry-error-for-a-zoom-to/m-p/726533#M3496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am a newbie with Silverlight/ArcGIS server development. I am developing a web app in ArcGIS Server 10, Silverlight 3, VS 2010. This is an upgrade to an app which was working in ArcGIS 9.x, VS 2008, Silverlight 2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am accessing an SDE layer and trying to zoom into the record that user inputs in an autocomplete box. It gets the selected feature but SelectedFeature.Geometry comes back as nothing, when it is expecting polygon geometry.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have the map service and the geometry service running on the server, tabular queries are coming back fine, it is the spatial queries which do not work. If I change the dynamic map service to my old map service(ArcGIS 9.x,...), the spatial queries also work perfectly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has this got anything to do with using SDE layer as the spatial layer? I cannot figure out why the geometry of the selected feature comes back as nothing from the new service. Something to do with Silverlight/ArcGIS 10 upgrade I s'pose. &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/19831-Getting-feature-geometry-type-in-arcgis-silverlight-api-2.0" rel="nofollow noopener noreferrer" target="_blank"&gt;Found a thread&lt;/A&gt;&lt;SPAN&gt;, which explains the same problem as mine, but it does not seem to have addressed the geometry part? Any help is appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Calling all experts&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;TIA&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Deepti&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Dim featureSet As FeatureSet = args.FeatureSet

If featureSet IsNot Nothing AndAlso featureSet.Features.Count &amp;gt; 0 Then
Dim selectedFeature As Graphic = featureSet.Features(0)

Dim selectedFeatureExtent As ESRI.ArcGIS.Client.Geometry.Envelope = selectedFeature.Geometry.Extent

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim expandPercentage As Double = 300
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim widthExpand As Double = selectedFeatureExtent.Width * (expandPercentage / 100)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim heightExpand As Double = selectedFeatureExtent.Height * (expandPercentage / 100)

 Dim displayExtent As New ESRI.ArcGIS.Client.Geometry.Envelope(selectedFeatureExtent.XMin - (widthExpand / 2), selectedFeatureExtent.YMin - (heightExpand / 2), selectedFeatureExtent.XMax + (widthExpand / 2), selectedFeatureExtent.YMax + (heightExpand / 2))

 MyMap.ZoomTo(displayExtent)

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:04:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/selected-feature-geometry-error-for-a-zoom-to/m-p/726533#M3496</guid>
      <dc:creator>DeeptiVB</dc:creator>
      <dc:date>2021-12-12T07:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: Selected Feature Geometry error for a zoom to selected functionality</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/selected-feature-geometry-error-for-a-zoom-to/m-p/726534#M3497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, solved it myself. The geometry type of the features in the featureset was coming back null in ArcGIS Server 10. It was coming back as Polygon when the map service was in ArcGIS Server 9. So while upgrading the web map app to 10, I had to explicitly state in code that query.returnGeometry = true. Works now.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jan 2011 18:34:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/selected-feature-geometry-error-for-a-zoom-to/m-p/726534#M3497</guid>
      <dc:creator>DeeptiVB</dc:creator>
      <dc:date>2011-01-26T18:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Selected Feature Geometry error for a zoom to selected functionality</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/selected-feature-geometry-error-for-a-zoom-to/m-p/726535#M3498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi...I set ReturnGeometry=true, but it doesn't work too. my toolkit version is 1.2, is your toolkit version 2.1?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; Mine is 2.1&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2011 17:52:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/selected-feature-geometry-error-for-a-zoom-to/m-p/726535#M3498</guid>
      <dc:creator>DeeptiVB</dc:creator>
      <dc:date>2011-05-04T17:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Selected Feature Geometry error for a zoom to selected functionality</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/selected-feature-geometry-error-for-a-zoom-to/m-p/726536#M3499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi...I set ReturnGeometry=true, but it doesn't work too. my toolkit version is 1.2, is your toolkit version 2.1?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; I had this problem again and I found that in the mxd you use to create your webservice, if you turn off the shape column of the layers you run the query on, selectedfeature.geometry comes back as null. Keep the shape column on if you are doing anything with geometry.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also make sure you have Geometry service running on your web server.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Dec 2011 18:19:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/selected-feature-geometry-error-for-a-zoom-to/m-p/726536#M3499</guid>
      <dc:creator>DeeptiVB</dc:creator>
      <dc:date>2011-12-02T18:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: Selected Feature Geometry error for a zoom to selected functionality</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/selected-feature-geometry-error-for-a-zoom-to/m-p/726537#M3500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;... if you turn off the shape column of the layers you run the query on, selectedfeature.geometry comes back as null...&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just so you know, that is expected behavior. We a field is invisible in source map (mxd/msd), query result does not include values from that invisible field.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Dec 2011 14:58:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/selected-feature-geometry-error-for-a-zoom-to/m-p/726537#M3500</guid>
      <dc:creator>TanuHoque</dc:creator>
      <dc:date>2011-12-05T14:58:04Z</dc:date>
    </item>
  </channel>
</rss>

