<%-- Copyright (C) 2004-2006 Autodesk, Inc. This library is free software; you can redistribute it and/or modify it under the terms of version 2.1 of the GNU Lesser General Public License as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --%> <%@ Page language="c#" %> <%@ Import Namespace="System" %> <%@ Import Namespace="System.Globalization" %> <%@ Import Namespace="OSGeo.MapGuide" %> Plot Task <% // Display a couple of forms prompting the user to either // plot the current view of the map, or the current view of // the map at a specified scale. Submitting one of these forms // opens a new window containing an EPlot DWF. The EPlot DWF // is generated by the plot.aspx script. String mgSessionId = GetRequestParameters()["SESSION"]; int currentScale = 0; NumberFormatInfo nf = new NumberFormatInfo(); nf.NumberDecimalDigits = 3; MgPoint viewCenter = null; double viewScale = 0; try { // Initialize the web- extensions and connect to the Site using // the session identifier stored in PHP session state. InitializeWebTier(); MgUserInformation userInfo = new MgUserInformation(mgSessionId); MgSiteConnection siteConnection = new MgSiteConnection(); siteConnection.Open(userInfo); MgMap map = new MgMap(siteConnection); map.Open("Sheboygan"); viewCenter = map.GetViewCenter(); viewScale = map.GetViewScale(); } catch (MgException mge) { Response.Write(mge.GetExceptionMessage()); Response.Write(mge.GetDetails()); } %>
 Plot as DWF
Plot a View of the Map
View Center X: <%= viewCenter.GetCoordinate().GetX().ToString(nf) %>
View Center Y: <%= viewCenter.GetCoordinate().GetY().ToString(nf) %>
View Scale: 1:<%= ((int)viewScale).ToString(nf) %>
Plot the Current Map View
 Use Print Layout
Plot at a Specified Scale
Scale:
 Use Print Layout