[mapguide-users] MapGuide Programming using C#, need help, please

Jonio, Dennis (Aviation) DJonio at miami-airport.com
Tue Feb 10 10:16:15 EST 2009


What is the value of "nameQuery" ... what is it that you are trying to
select? Have/did you define your selection? What is it you expect to
see?
I would hazard to guess that your current issue has nothing to do with
the cast or no cast of MgLayerBase ....



-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of staniz
Sent: Tuesday, February 10, 2009 10:01 AM
To: mapguide-users at lists.osgeo.org
Subject: Re: [mapguide-users] MapGuide Programming using C#, need help,
please


Dennis, I am really sorry for making you confused because I mistyped the
code.
These are the original code that I copied from aspx that i got the first
error.

//Highlight the query result on the map
    MgSelection selection = new MgSelection(map);
    MgLayer layer = map.GetLayers().GetItem("Parcels");
    featureReader = featureService.SelectFeatures(parcelId, "Parcels",
nameQuery);
    selection.AddFeatures(layer, featureReader, 0);
    String selectionXML = selection.ToXml();

I changed the line to  ---MgLayerBase layer =
map.GetLayers().GetItem("Parcels");--- 
as your suggestion but the Query result is still empty.

I am sorry.




More information about the mapguide-users mailing list