HHHello, I have this code, to start the map with coordinates with parameters 
passed in the URL.


            String requestParams STRX = [ "X"];

            String requestParams String = [ "Y"];


            MgSiteConnection siteconection = new MgSiteConnection ();

            siteconection.Open (new MgUserInformation (sessionId));

            MgResourceService resourceService = (MgResourceService)
siteconection.CreateService (MgServiceType.ResourceService) as
MgResourceService;


            MgResourceIdentifier wlresourceId = new MgResourceIdentifier 
(webLayout);

            MgByteReader wlreader = resourceService.GetResourceContent 
(wlresourceId);

            WlXML = wlreader.ToString String ();

            XmlDocument doc = new XmlDocument ();

            doc.LoadXml (wlXML);


            XmlNode doc.GetElementsByTagName NodeCenterx = ( "centerX"). Item 
(0);

            NodeCenterx.LastChild.Value = STRX;

            XmlNode doc.GetElementsByTagName NodeCenterY = ( "centerY"). Item 
(0);

            NodeCenterY.LastChild.Value = STRY;

            XmlNode doc.GetElementsByTagName NodeScale = ( "Scale"). Item (0);

            NodeScale.LastChild.Value = "2000";


            StreamSave MemoryStream = new MemoryStream ();

            doc.Save (streamSave);

            byte [] byteArr = streamSave.ToArray ();

            MgByteSource Bytesource = new MgByteSource (byteArr, 
byteArr.Length);


            / / Create weblayout in the session to update the new version

            SessionmapName = wlresourceId.GetName String ();

            SessionWebLayout String = "Session" + sessionId + "/ /" + + 
sessionmapName. WebLayout ";

            MgResourceIdentifier sessionResourceId = new MgResourceIdentifier 
(sessionWebLayout);


            / / Write to the session

            resourceService.SetResource (sessionResourceId, 
Bytesource.GetReader (), null);


webLayout = sessionWebLayout;

src ="../ mapviewernet / ajaxviewer.aspx? SESSION = <% = sessionId%> & 
WEBLAYOUT = <% = webLayout%> "


But I returned the following error:


The type 'OSGeo.MapGuide.MgUnclassifiedException' of assembly
'MapGuideDotNetApi, Version = 2.0.2.3011, Culture = neutral,
PublicKeyToken = null' is not marked as serializable.



Anybody know why it can be???


Thank you very much in advance and best regards!
        
                                          
_________________________________________________________________
Los auténticos Hotmail y Messenger ahora en tu móvil. ¡Gratis!
http://serviciosmoviles.es.msn.com/
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Reply via email to