[mapguide-users] How to get X Y coordinates of features data in a layer

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Mon Sep 14 03:20:06 EDT 2009


You need to query the FeatureSource and read out the geometry for the 
objects.
This is easiest if the records have a primary key.

These are relevant links that document the required service and method:
http://mapguide.osgeo.net/files/mapguide/docs/webapi/de/ddf/group___feature___service___module.html
http://mapguide.osgeo.net/files/mapguide/docs/webapi/d5/d10/class_mg_feature_service_cd90e83ea6f7d1c0c68b8547c7ec6286.html#cd90e83ea6f7d1c0c68b8547c7ec6286
http://mapguide.osgeo.net/files/mapguide/docs/webapi/d6/ddc/class_mg_feature_reader.html

Basically, you get a MgFeatureReader from the FeatureService, by calling 
the SelectFeatures method.
There are examples within the documentation, but also look at the 
buffer.(aspx|jsp|php) file in your MapGuide installation
for a real example in the language of your choosing.

Regards, Kenneth Skovhede, GEOGRAF A/S



Amit Kumar Shukla skrev:
> Hi List,
>
> I'm using MapGuide Open Source 2.1 Beta 1. I want to measure distance 
> between objects to show nearest objects of a selected point on the 
> map. I'm easily getting the coordinate of the selected point but how 
> to get the coordinates of the other objects from another layer.
>
> Hopefully someone help me.
>
> Thanks and regards
> Amit
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20090914/ff691686/attachment.html


More information about the mapguide-users mailing list