I haven't used the official API for a while, because I made my own.
You can see how to do use it on this page:
http://code.google.com/p/mapstudioos/wiki/HowToUseMapGuideAPI
With that API you can use the following code:
MapGuideAPI.ServerConnectionI con = new HttpServerConnection(new
Uri("http://localhost/mapguide/mapagent/mapagent.fcgi"),
"Administrator", "admin", null);
MapGuideAPI.FeatureSetReader fsr =
con.QueryFeatureSource("Library://sample.FeatureSource", "SDF_2:Schema",
"ID=5 OR ID=7", new string[] { "ID", "GEOM" });
while(fsr.Read())
{
MapGuideAPI.FeatureSetRow row = fsr.Row;
MapGuideAPI.Geometry geom = (MapGuideAPI.Geometry)fsr["GEOM"];
int id = (int)fsr["ID"];
}
You should be able to find some similar code for the official API in the
selection handler, supplied with the MapGuide viewer.
Regards, Kenneth, GEOGRAF A/S
Áron Deák skrev:
Thank you for your quick reply, I am still stuck tough.
What I really need is to be able to access the feature information on
the server without having to create a viewer.
I couldn't find sample code that does this, please show me how I could
do this.
Thanks in advance
Aron Deak
------------------------------------------------------------------------
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users