<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
<span class="ul-threaded" style="margin: 0.5em 0pt 0pt -20px;"><span style="" class="text-cell">HHHello, </span></span><span id="result_box" class="medium_text"><span title="Tengo este código, para iniciar el mapa con unas coordenadas pasadas con parametros en la URL.">I have this code, to start the map with coordinates with parameters passed in the URL.<br></span></span><span class="ul-threaded" style="margin: 0.5em 0pt 0pt -20px;"><span style="" class="text-cell"><br><font style="font-size: 10pt;" size="2"><br></font><font style="font-size: 10pt;" size="2"><i> String requestParams STRX = [ "X"];
<br> String requestParams String = [ "Y"];
<br><br> MgSiteConnection siteconection = new MgSiteConnection ();
<br> siteconection.Open (new MgUserInformation (sessionId));
<br> MgResourceService resourceService = (MgResourceService)
siteconection.CreateService (MgServiceType.ResourceService) as
MgResourceService;
<br><br> MgResourceIdentifier wlresourceId = new MgResourceIdentifier (webLayout);
<br> MgByteReader wlreader = resourceService.GetResourceContent (wlresourceId);
<br> WlXML = wlreader.ToString String ();
<br> XmlDocument doc = new XmlDocument ();
<br> doc.LoadXml (wlXML);
<br><br> XmlNode doc.GetElementsByTagName NodeCenterx = ( "centerX"). Item (0);
<br> NodeCenterx.LastChild.Value = STRX;
<br> XmlNode doc.GetElementsByTagName NodeCenterY = ( "centerY"). Item (0);
<br> NodeCenterY.LastChild.Value = STRY;
<br> XmlNode doc.GetElementsByTagName NodeScale = ( "Scale"). Item (0);
<br> NodeScale.LastChild.Value = "2000";
<br><br> StreamSave MemoryStream = new MemoryStream ();
<br> doc.Save (streamSave);
<br> byte [] byteArr = streamSave.ToArray ();
<br> MgByteSource Bytesource = new MgByteSource (byteArr, byteArr.Length);
<br><br> / / Create weblayout in the session to update the new version
<br> SessionmapName = wlresourceId.GetName String ();
<br> SessionWebLayout String = "Session" + sessionId + "/ /" + + sessionmapName. WebLayout ";
<br> MgResourceIdentifier sessionResourceId = new MgResourceIdentifier (sessionWebLayout);
<br><br> / / Write to the session
<br> resourceService.SetResource (sessionResourceId, Bytesource.GetReader (), null);
<br><br>webLayout = sessionWebLayout;
<br>src ="../ mapviewernet / ajaxviewer.aspx? SESSION = <% = sessionId%> & WEBLAYOUT = <% = webLayout%> "
</i></font><br><br>But I returned the following error:
<br><br>The type 'OSGeo.MapGuide.MgUnclassifiedException' of assembly
'MapGuideDotNetApi, Version = 2.0.2.3011, Culture = neutral,
PublicKeyToken = null' is not marked as serializable.
<br><br><br>Anybody know why it can be???
<br><br>Thank you very much in advance and best regards!
        
</span></span>                                            <br /><hr />El NUEVO Internet Explorer 8 es el navegador más rápido y seguro <a href='http://www.vivelive.com/internetexplorer8/' target='_new'> ¡Descárgalo gratis!</a></body>
</html>