Changes between Version 3 and Version 4 of maestro/MaestroAPI/samples/CustomizedZoomWithWebLayout
- Timestamp:
- 03/14/09 06:52:52 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TabularUnified maestro/MaestroAPI/samples/CustomizedZoomWithWebLayout
v3 v4 41 41 con.SaveResourceAs(weblayout, tempid) 42 42 43 'Open the viewer, and use the temporary layout, since the maponly exists in the43 'Open the viewer, and use the temporary layout, since the layout only exists in the 44 44 'current session, we must use that session, and NOT supply username/password 45 45 Response.Redirect("/mapguide/ajaxviewer/?LAYOUT=" & Server.UrlEncode(tempWebLayout) & "&SESSION=" & Server.UrlEncode(con.SessionID), true) … … 48 48 (C#) 49 49 {{{ 50 importOSGeo.MapGuide.MaestroAPI;50 using OSGeo.MapGuide.MaestroAPI; 51 51 ... 52 52 53 53 //Read the setup, either from QueryString, Form, Cookies or hardcoded values 54 string username As= Request.Params("USERNAME") == null ? "Anonymous" : Request.Params("USERNAME");54 string username = Request.Params("USERNAME") == null ? "Anonymous" : Request.Params("USERNAME"); 55 55 string password = Request.Params("PASSWORD") == null ? "" : Request.Params("PASSWORD"); 56 56 string layout = Request.Params("LAYOUT") == null ? "Library://MyLayout.WebLayout" : Request.Params("LAYOUT"); … … 60 60 //Setup connection 61 61 Uri host = new Uri("http://localhost/mapguide/mapagent/mapagent.fcgi"); 62 ServerConnectionI con n = new HttpServerConnection(host, username , password, locale, True);62 ServerConnectionI con = new HttpServerConnection(host, username , password, locale, true); 63 63 64 64 'Obtain the weblayout and map … … 78 78 con.SaveResourceAs(weblayout, tempid); 79 79 80 //Open the viewer, and use the temporary layout, since the maponly exists in the80 //Open the viewer, and use the temporary layout, since the layout only exists in the 81 81 //current session, we must use that session, and NOT supply username/password 82 82 Response.Redirect("/mapguide/ajaxviewer/?LAYOUT=" + Server.UrlEncode(tempWebLayout) + "&SESSION=" + Server.UrlEncode(con.SessionID), true);