<?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: X, Y Coordinates shown but can't be grabbed in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/x-y-coordinates-shown-but-can-t-be-grabbed/m-p/1474891#M12715</link>
    <description>&lt;P&gt;Hello - The OutSpatialReference wouln't take any direct value assignment, would it. I remember&amp;nbsp; before I got here, I did an equal sign for it, but it was red underlined. I think I will try t to see if it has somthing like a a built in method Add or something like that to pass in the value.&lt;BR /&gt;For now as stated, I invoke the Geometry Engine every time I want to get the X and Y with the target ref 4269&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 18 May 2024 02:55:52 GMT</pubDate>
    <dc:creator>KTT_Mercury</dc:creator>
    <dc:date>2024-05-18T02:55:52Z</dc:date>
    <item>
      <title>X, Y Coordinates shown but can't be grabbed</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/x-y-coordinates-shown-but-can-t-be-grabbed/m-p/1436327#M12697</link>
      <description>&lt;P&gt;Howdy,&lt;/P&gt;&lt;P&gt;I'm trying to query a feature layer that I got added succesfully into a map.&lt;BR /&gt;My program is very much like that of the sample program on ESRI tutorial page, query a map feature layer:&amp;nbsp;&lt;A href="https://developers.arcgis.com/net/query/tutorials/query-a-feature-layer-sql/" target="_blank"&gt;https://developers.arcgis.com/net/query/tutorials/query-a-feature-layer-sql/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I'm not using the sample's provided parcel endpoint, I've supplied my own feature service REST API endpoint.&lt;/P&gt;&lt;P&gt;The query went through and returned about some hundred of points. The issue is I can't seem to grab the X and Y even though they are shown clearly in the debug window under Geometry. Only a handful of properties such as HasM, HasZ, HasCurves shown up in the context menu/visual-studio&amp;nbsp;IntelliSense.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I couldn't help but am thinking this may be a known bug ? [as it happened to a software vendor our company had before and it didn't get fixed until later version] or am I missing something? Can you please help me straighten this up?&lt;BR /&gt;&lt;BR /&gt;Such a torture I can't extract the coordinates - using a simple foreach loop - knowing they're there.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;// Query the table and get the list of features in the result.
var queryResult = await featureTableToQuery.QueryFeaturesAsync(queryParams);

// Loop over each feature from the query result.
foreach (Feature feature in queryResult)
{
      double tempX = feature.Geometry.X // error
      bool tempChecked = feature.Geometry.HasZ // okay
      // Select each feature.
      // featureLayerToQuery!.SelectFeature(feature);

}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="XYCoordNotShowUp.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/103837i1C3AC4B33F085AB9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="XYCoordNotShowUp.png" alt="XYCoordNotShowUp.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2024 02:14:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/x-y-coordinates-shown-but-can-t-be-grabbed/m-p/1436327#M12697</guid>
      <dc:creator>KTT_Mercury</dc:creator>
      <dc:date>2024-05-11T02:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: X, Y Coordinates shown but can't be grabbed</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/x-y-coordinates-shown-but-can-t-be-grabbed/m-p/1436480#M12698</link>
      <description>&lt;P&gt;The feature query returns "Geometry" which is the baseclass of "MapPoint", since it could have been a polygon or polyline. So you first need to cast it to MapPoint:&lt;/P&gt;&lt;P&gt;double tempX = ((MapPoint)feature.Geometry).X;&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2024 02:40:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/x-y-coordinates-shown-but-can-t-be-grabbed/m-p/1436480#M12698</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2024-05-11T02:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: X, Y Coordinates shown but can't be grabbed</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/x-y-coordinates-shown-but-can-t-be-grabbed/m-p/1436634#M12699</link>
      <description>&lt;P&gt;I have a follow-up question regarding this Geometry entity. How can I change the SpatialReference Wkid to a different 4-digit value like 4269, so X, Y will be represented more like longigute and latitude measure rather than huge measures shown. The SpatialReference Under Geometry observed here is readonly I think (I don't have Visual Studio with me now)&amp;nbsp;&lt;BR /&gt;I've read the documentation and so far I've only seen JSON based definition/discussion up and down, I'm looking for when can I set a spatial ref value on the fly, in the query building context like this:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;QueryParameters queryParams = new QueryParameters {
      Geometry = queryExtent,
      ReturnGeometry = true,
      WhereClause = whereExpression,
      // possible do spatial ref assignment here 
      // to override whichever the default ref is:

};&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2024 03:05:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/x-y-coordinates-shown-but-can-t-be-grabbed/m-p/1436634#M12699</guid>
      <dc:creator>KTT_Mercury</dc:creator>
      <dc:date>2024-05-11T03:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: X, Y Coordinates shown but can't be grabbed</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/x-y-coordinates-shown-but-can-t-be-grabbed/m-p/1436950#M12700</link>
      <description>&lt;P&gt;By default you're getting coordinates in the projection of your map - which is probably WebMercator.&lt;/P&gt;&lt;P&gt;In the query you can set the output spatial reference, by setting the OutSpatialReference on your QueryParameters:&amp;nbsp;&lt;A href="https://developers.arcgis.com/net/api-reference/api/net/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Data.QueryParameters.OutSpatialReference.html" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/net/api-reference/api/net/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Data.QueryParameters.OutSpatialReference.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;You can also use the &lt;A href="https://developers.arcgis.com/net/api-reference/api/net/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Geometry.GeometryEngine.Project.html" target="_self"&gt;GeometryEngine to project coordinates&lt;/A&gt;. For instance:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;var newGeometry = GeometryEngine.Project(feature.Geometry, SpatialReference.Create(4269));&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2024 03:58:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/x-y-coordinates-shown-but-can-t-be-grabbed/m-p/1436950#M12700</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2024-05-11T03:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: X, Y Coordinates shown but can't be grabbed</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/x-y-coordinates-shown-but-can-t-be-grabbed/m-p/1464742#M12705</link>
      <description>&lt;P&gt;Hello -&amp;nbsp; I tried to appy the SpatialReference.Create(4269) a to queryExtent.Geometry b, although it shows X, Y got affected by the GeometryEngine.Project (a, b) statement, it does nothing when being passed in the QueryParameters constructor to build the query param. Looks like queryExtend.Geometry got ignored.&lt;BR /&gt;&lt;BR /&gt;It looks like I will have to issue a GeometryEngine.Project (a, b); for every feature per ilteration in the for loop. Thank you though.&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 07:39:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/x-y-coordinates-shown-but-can-t-be-grabbed/m-p/1464742#M12705</guid>
      <dc:creator>KTT_Mercury</dc:creator>
      <dc:date>2024-05-14T07:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: X, Y Coordinates shown but can't be grabbed</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/x-y-coordinates-shown-but-can-t-be-grabbed/m-p/1466245#M12706</link>
      <description>&lt;P&gt;Did you try setting the OutSpatialReference property as I suggested?&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 16:15:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/x-y-coordinates-shown-but-can-t-be-grabbed/m-p/1466245#M12706</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2024-05-14T16:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: X, Y Coordinates shown but can't be grabbed</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/x-y-coordinates-shown-but-can-t-be-grabbed/m-p/1474891#M12715</link>
      <description>&lt;P&gt;Hello - The OutSpatialReference wouln't take any direct value assignment, would it. I remember&amp;nbsp; before I got here, I did an equal sign for it, but it was red underlined. I think I will try t to see if it has somthing like a a built in method Add or something like that to pass in the value.&lt;BR /&gt;For now as stated, I invoke the Geometry Engine every time I want to get the X and Y with the target ref 4269&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 18 May 2024 02:55:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/x-y-coordinates-shown-but-can-t-be-grabbed/m-p/1474891#M12715</guid>
      <dc:creator>KTT_Mercury</dc:creator>
      <dc:date>2024-05-18T02:55:52Z</dc:date>
    </item>
  </channel>
</rss>

