<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
You have to do the following:<br>
1) Query the featuresource<br>
2) Read the geometry from the response<br>
3) Extract the coordinates<br>
<br>
Item (1) is done with the MgFeatureService.SelectFeatures:<br>
<a class="moz-txt-link-freetext" href="http://mapguide.osgeo.org/files/mapguide/docs/webapi/d5/d10/class_mg_feature_service_cc4faabfd68e8e891287f62e150e2d0d.htm#cc4faabfd68e8e891287f62e150e2d0d">http://mapguide.osgeo.org/files/mapguide/docs/webapi/d5/d10/class_mg_feature_service_cc4faabfd68e8e891287f62e150e2d0d.htm#cc4faabfd68e8e891287f62e150e2d0d</a><br>
<br>
As you can see, the result is a MgFeatureReader instance:<br>
<a class="moz-txt-link-freetext" href="http://mapguide.osgeo.org/files/mapguide/docs/webapi/d6/ddc/class_mg_feature_reader.htm">http://mapguide.osgeo.org/files/mapguide/docs/webapi/d6/ddc/class_mg_feature_reader.htm</a><br>
<br>
The link has example code that shows how to read the data, and find
find a column with the geometry, which is item (2).<br>
<br>
The MgAgfReaderWrite can transform that geometry column into a
MgGeometry object:<br>
<a class="moz-txt-link-freetext" href="http://mapguide.osgeo.org/files/mapguide/docs/webapi/dd/db3/class_mg_agf_reader_writer.htm">http://mapguide.osgeo.org/files/mapguide/docs/webapi/dd/db3/class_mg_agf_reader_writer.htm</a><br>
<a class="moz-txt-link-freetext" href="http://mapguide.osgeo.org/files/mapguide/docs/webapi/d1/d85/class_mg_geometry.htm">http://mapguide.osgeo.org/files/mapguide/docs/webapi/d1/d85/class_mg_geometry.htm</a><br>
<br>
Depending on your geometry type, you get a MgPoint, MgMultiPoint,
MgLineString, etc. object (hint: GetGeometryType).<br>
You need to decide how to get the x/y from such objects, but usually
you can use GetCentroid():<br>
<a class="moz-txt-link-freetext" href="http://mapguide.osgeo.org/files/mapguide/docs/webapi/dc/d21/class_mg_geometric_entity_3830444d005bbcff7bf4b4644a7a2dfc.htm#3830444d005bbcff7bf4b4644a7a2dfc">http://mapguide.osgeo.org/files/mapguide/docs/webapi/dc/d21/class_mg_geometric_entity_3830444d005bbcff7bf4b4644a7a2dfc.htm#3830444d005bbcff7bf4b4644a7a2dfc</a><br>
<br>
The centroid is the "center" of the object, and thus always a point,
and you have item (3).<br>
<br>
<pre class="moz-signature" cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
</pre>
<br>
<br>
Amit Kumar Shukla skrev:
<blockquote
 cite="mid:da9418290909230005r1d6aae0bwa1e3b1975be4bd8f@mail.gmail.com"
 type="cite">Hi,<br>
Can anyone tell me how to&nbsp; get the x-y coordinate of any object on map
trough query feature without using digitization method?<br>
Any suggestion or help will be appricated.<br clear="all">
  <br>
-- <br>
Thanks and regards-<br>
Amit <br>
  <br>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
  </pre>
</blockquote>
</body>
</html>