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

Jonio, Dennis (Aviation) DJonio at miami-airport.com
Tue Feb 10 09:22:06 EST 2009

I have not a clue what you are doing with it later but just change the
line to this ... 
MgLayerBase layer = map.GetLayers().GetItem("Parcels");

BTW ... it is NOT Mglayer it is MgLayer

-----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 9:11 AM
To: mapguide-users at lists.osgeo.org
Subject: Re: [mapguide-users] MapGuide Programming using C#, need help,

Thanks for comments.
I have tried to modify  by adding (MgLayer) to DisplayQueryResult.aspx 
---MgLayer layer = (Mglayer)map.GetLayers().GetItem("Parcels");--- , 
but no result coming after  pushing the Submit Query Button .


staniz wrote:
> I am using MGE Server and Studio 2008, windows XP and IIS 5.1. I
> downloaded sample code from
> these code is recommended for MGE2007, but I think its also work for
> MGE2008.
> I followed all the instruction in video, and ran the default.aspx. Its
> worked by but When I was trying to run the Query.aspx and execute the
> DisplayQueryResult.aspx I got the following error:
> ----
> Compiler Error Message : CS0266:
> cannot implicitly convert type
> `OSGeo.Mapguide.MgLayerBase` to
> `OSGeo.Mapguide.MgLayer`. An explicit 
> conversion exist (are you missing a cast?)
> Source code:
> Line 58:  MgLayer layer =map.Getlayer().GetItem("Parcels");
> .Net framwork Version:2.0.50727.42
> ----
> please help to solve this problem...
> thanks is advance.
> staniz

View this message in context:
Sent from the MapGuide Users mailing list archive at Nabble.com.

mapguide-users mailing list
mapguide-users at lists.osgeo.org

E-mails are automatically scanned for viruses using McAfee.

More information about the mapguide-users mailing list