[mapguide-users] current selection does not work

Tony_mg techswami at hotmail.com
Thu Sep 4 04:00:34 EDT 2008


String l_sSession = GetParameters()["SESSION"];  
String l_sSelect = Request .Form ["SEL"];

 MgUserInformation l_oCred = new MgUserInformation(l_sSession);
                    MgSiteConnection l_oSite = new MgSiteConnection();
                    l_oSite.Open(l_oCred);
                    ArrayList listEQ = null;
                    MgResourceService l_oResourceSrvc =
(MgResourceService)l_oSite.CreateService(MgServiceType.ResourceService);
                    MgFeatureService l_oFeatureSrvc =
(MgFeatureService)l_oSite.CreateService(MgServiceType.FeatureService);

                    MgMap l_oMap = new MgMap();
                    l_oMap.Open(l_oResourceSrvc, "General Public Map");
                    MgSelection l_oSel = new MgSelection(l_oMap);

                    l_oSel.FromXml(l_sSelect);
getting error at FromXML by the way i am passing more then 500 selection
                    MgReadOnlyLayerCollection l_cSelLayers =
l_oSel.GetLayers();
  MgFeatureReader featReader = null;
  for (int i = 0; i < l_cSelLayers.GetCount(); i++)
  {
      MgLayer layer = l_cSelLayers.GetItem(i) as MgLayer;
      if ((layer != null) && (layer.GetName() == "main"))
      {

          Response.Write("Layer found");
      }
  }
    
any ideas , its kinda urgent . please  help 


-- 
View this message in context: http://www.nabble.com/current-selection--does-not-work-tp19305385p19305385.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list