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: [email protected] [mailto:[email protected]] On Behalf Of staniz Sent: Tuesday, February 10, 2009 10:01 AM To: [email protected] 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. _______________________________________________ mapguide-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapguide-users
