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

staniz ustazin at yahoo.com
Tue Feb 10 10:44:09 EST 2009


Thanks Dennis,
It is working now, actually there are two query value in this example. The
first one is the list box selection that select the District 1 until
District 11, and the other is text Box for parcels owner`s name.

I used this line
	---MgLayerBase layer = map.GetLayers().GetItem("Parcels");---

I do check in the SDF table and the value of the NAME Field all in capital
letter so, I type value for query with all capital letter and got the
result.

many thanks
  



djonio wrote:
> 
> 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.
> 
> 
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 

-- 
View this message in context: http://n2.nabble.com/MapGuide-Programming-using-C-%2C-need-help%2C-please-tp2301814p2303170.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list