<%-- Copyright (C) 2004-2011 by 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.Xml" %> <%@ Import Namespace="OSGeo.MapGuide" %> Map Info <% //---------------------------------------------------// // Initialize MapGuideApi.MgInitializeWebTier(Constants.WebConfigPath); sessionId = Request.Params["SESSION"]; mapName = Request.Params["MAPNAME"]; MgUserInformation userInfo = new MgUserInformation(sessionId); MgSiteConnection siteConnection = new MgSiteConnection(); siteConnection.Open(userInfo); MgMap map = new MgMap(siteConnection); map.Open(mapName); %>

Map Name: <%= map.GetName() %>

Object Id: <%= map.GetObjectId() %>

Map Definition: <%= map.GetMapDefinition().ToString() %>


Display DPI: <%= map.GetDisplayDpi() %>

Display Height: <%= map.GetDisplayHeight() %>

Display Width: <%= map.GetDisplayWidth() %>


View Center: (<%= map.GetViewCenter().GetCoordinate().GetX() %>, <%= map.GetViewCenter().GetCoordinate().GetY() %>)

View Scale: <%= map.GetViewScale() %>


<% MgEnvelope dataExtents = map.GetDataExtent(); MgCoordinate ll = dataExtents.GetLowerLeftCoordinate(); MgCoordinate ur = dataExtents.GetUpperRightCoordinate(); %>

Data Extents

Lower Left: (<%= ll.GetX() %>, <%= ll.GetY() %>)

Upper Left: (<%= ur.GetX() %>, <%= ur.GetY() %>)


<% MgLayerCollection layers = map.GetLayers(); %>

Layers (<%= layers.GetCount() %>)

<% for (int i = 0; i < layers.GetCount(); i++) { MgLayerBase layer = layers.GetItem(i); MgLayerGroup group = layer.GetGroup(); %> <% } %>
Name Group Label Legend Visible Potential Visible Actual Visible Expand In Legend Layer Type Layer Definition Feature Source Id Object Id Needs Refresh
<%= layer.GetName() %> <%= group == null ? "" : group.Name %> <%= layer.GetLegendLabel() %> <%= layer.GetDisplayInLegend() %> <%= layer.GetVisible() %> <%= layer.IsVisible() %> <%= layer.GetExpandInLegend() %> <%= layer.GetLayerType() %> <%= layer.GetLayerDefinition().ToString() %> <%= layer.GetLayerDefinition().ToString() %> <%= layer.GetObjectId() %> <%= layer.NeedsRefresh() %>

<% MgLayerGroupCollection layerGroups = map.GetLayerGroups(); %>

Layer Groups (<%= layerGroups.GetCount() %>)

<% for (int i = 0; i < layerGroups.GetCount(); i++) { MgLayerGroup group = layerGroups.GetItem(i); MgLayerGroup parent = group.GetGroup(); %> <% } %>
Name Group Label Legend Visible Potential Visible Actual Visible Expand In Legend Group Type
<%= group.GetName() %> <%= parent == null ? "" : parent.Name %> <%= group.GetLegendLabel() %> <%= group.GetDisplayInLegend() %> <%= group.GetVisible() %> <%= group.IsVisible() %> <%= group.GetExpandInLegend() %> <%= group.GetLayerGroupType() %>