[mapguide-users] list selection example in c#

Kenneth, GEOGRAF A/S ks at geograf.dk
Tue Jun 5 06:49:22 EDT 2007


In C# that would look like:

MgLayerCollection layers = null;
if (Request.Form["SELECTION"] != null && Request.Form["SELECTION"] != "")
{
    MgSelection selection = new MgSelection(map, Request.Form["SELECTION"]);
    layers = selection.GetLayers();
}

Was that what you were looking for?

Regards, Kenneth, GEOGRAF A/S



Micha Lehmann wrote:
> ok, i solved it for the ajax viewer, but i have problems with dwf, there 
> is a little difference in the code, in php its:
> ------------------------------------
> if (isset($_POST['SELECTION']) && $_POST['SELECTION'] != '')
>        {
>          $selection = new MgSelection($map, $_POST['SELECTION']);
>          $layers = $selection->GetLayers();
>        }
>        else
>        $layers = 0;
>
> -----------------------------------
>
> i´m not sure how to put these into c#, maybe anyone could help me please?
>
> thx
>
> micha
>   


More information about the mapguide-users mailing list