[mapguide-commits] r6269 - in trunk/Tools/Maestro:
OSGeo.MapGuide.MaestroAPI OSGeo.MapGuide.MaestroAPI/Mapping
OSGeo.MapGuide.MaestroAPI/Services SDK/SamplesWeb/SamplesWeb
SDK/SamplesWeb/SamplesWeb/Tasks
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Thu Dec 1 09:06:49 EST 2011
Author: jng
Date: 2011-12-01 06:06:49 -0800 (Thu, 01 Dec 2011)
New Revision: 6269
Modified:
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMapLayer.cs
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Services/IResourceService.cs
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/XmlValidator.cs
trunk/Tools/Maestro/SDK/SamplesWeb/SamplesWeb/SamplesWeb.csproj
trunk/Tools/Maestro/SDK/SamplesWeb/SamplesWeb/Tasks/Home.aspx
trunk/Tools/Maestro/SDK/SamplesWeb/SamplesWeb/Tasks/LayerInfo.aspx
trunk/Tools/Maestro/SDK/SamplesWeb/SamplesWeb/Tasks/LayerInfo.aspx.cs
Log:
Update the Web Samples with an example of modifying read-only RuntimeMapLayer properties (in this case, the filter property) via layer replacement. Also update some API documentation
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMapLayer.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMapLayer.cs 2011-11-30 13:53:57 UTC (rev 6268)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMapLayer.cs 2011-12-01 14:06:49 UTC (rev 6269)
@@ -436,9 +436,9 @@
}
/// <summary>
- /// Gets or sets the name of the qualified class.
+ /// Gets the name of the qualified name of the feature class.
/// </summary>
- /// <value>The name of the qualified class.</value>
+ /// <value>The name of the qualified name of the feature class.</value>
public string QualifiedClassName
{
get;
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Services/IResourceService.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Services/IResourceService.cs 2011-11-30 13:53:57 UTC (rev 6268)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Services/IResourceService.cs 2011-12-01 14:06:49 UTC (rev 6269)
@@ -291,8 +291,13 @@
/// <param name="resource"></param>
void SaveResource(IResource resource);
/// <summary>
- /// Saves an object into the repository
+ /// Saves an object into the repository using the specified resource id.
/// </summary>
+ /// <remarks>
+ /// The <paramref name="resourceid"/> parameter only instructs this method where to save the resource to. It does
+ /// not modify the <see cref="P:IResource.ResourceID"/> property of the input resource does not get
+ /// updated as a result of this operation.
+ /// </remarks>
/// <param name="resource">The object to save</param>
/// <param name="resourceid">The resourceId to save the object as</param>
void SaveResourceAs(IResource resource, string resourceid);
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/XmlValidator.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/XmlValidator.cs 2011-11-30 13:53:57 UTC (rev 6268)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/XmlValidator.cs 2011-12-01 14:06:49 UTC (rev 6269)
@@ -222,6 +222,14 @@
}
}
+ string xsdName = res.ResourceType.ToString() + "-" + res.ResourceVersion.ToString() + ".xsd";
+ if (!xsds.ContainsKey(xsdName))
+ {
+ var schemaObj = GetXsd(xsdPath, xsdName);
+ if (schemaObj != null)
+ xsds.Add(xsdName, schemaObj);
+ }
+
var validator = new XmlValidator();
using (var ms = new MemoryStream(Encoding.UTF8.GetBytes(xml)))
{
Modified: trunk/Tools/Maestro/SDK/SamplesWeb/SamplesWeb/SamplesWeb.csproj
===================================================================
--- trunk/Tools/Maestro/SDK/SamplesWeb/SamplesWeb/SamplesWeb.csproj 2011-11-30 13:53:57 UTC (rev 6268)
+++ trunk/Tools/Maestro/SDK/SamplesWeb/SamplesWeb/SamplesWeb.csproj 2011-12-01 14:06:49 UTC (rev 6269)
@@ -89,6 +89,7 @@
<Content Include="Tasks\FeatureInfo.aspx" />
<Content Include="Tasks\LayerInfo.aspx" />
<Content Include="Tasks\ListSelection.aspx" />
+ <Content Include="Tasks\ModifyParcelsFilter.aspx" />
<Content Include="Tasks\SetSelectedFeatures.aspx" />
<Content Include="Tasks\ToggleGroupVisibility.aspx" />
<Content Include="Tasks\ToggleLayerVisibility.aspx" />
@@ -143,6 +144,13 @@
<Compile Include="Tasks\ListSelection.aspx.designer.cs">
<DependentUpon>ListSelection.aspx</DependentUpon>
</Compile>
+ <Compile Include="Tasks\ModifyParcelsFilter.aspx.cs">
+ <DependentUpon>ModifyParcelsFilter.aspx</DependentUpon>
+ <SubType>ASPXCodeBehind</SubType>
+ </Compile>
+ <Compile Include="Tasks\ModifyParcelsFilter.aspx.designer.cs">
+ <DependentUpon>ModifyParcelsFilter.aspx</DependentUpon>
+ </Compile>
<Compile Include="Tasks\SetSelectedFeatures.aspx.cs">
<DependentUpon>SetSelectedFeatures.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
Modified: trunk/Tools/Maestro/SDK/SamplesWeb/SamplesWeb/Tasks/Home.aspx
===================================================================
--- trunk/Tools/Maestro/SDK/SamplesWeb/SamplesWeb/Tasks/Home.aspx 2011-11-30 13:53:57 UTC (rev 6268)
+++ trunk/Tools/Maestro/SDK/SamplesWeb/SamplesWeb/Tasks/Home.aspx 2011-12-01 14:06:49 UTC (rev 6269)
@@ -45,6 +45,7 @@
<li><a href="#" onclick="Go('../SamplesWeb/Tasks/AddThemedDistrictsLayer.aspx')">Add Themed Districts Layer</a></li>
<li><a href="#" onclick="Go('../SamplesWeb/Tasks/ToggleGroupVisibility.aspx','GROUPNAME','Base Map')">Toggle "Base Map" Group</a></li>
<li><a href="#" onclick="Go('../SamplesWeb/Tasks/ToggleLayerVisibility.aspx','LAYERNAME','Parcels')">Toggle "Parcels" Layer</a></li>
+ <li><a href="#" onclick="Go('../SamplesWeb/Tasks/ModifyParcelsFilter.aspx')">Change "Parcels" layer filter</a></li>
</ul>
<p>Feature Selection:</p>
<ul>
Modified: trunk/Tools/Maestro/SDK/SamplesWeb/SamplesWeb/Tasks/LayerInfo.aspx
===================================================================
--- trunk/Tools/Maestro/SDK/SamplesWeb/SamplesWeb/Tasks/LayerInfo.aspx 2011-11-30 13:53:57 UTC (rev 6268)
+++ trunk/Tools/Maestro/SDK/SamplesWeb/SamplesWeb/Tasks/LayerInfo.aspx 2011-12-01 14:06:49 UTC (rev 6269)
@@ -11,7 +11,7 @@
<div>
<input id="MAPNAME" runat="server" type="hidden" />
<input id="SESSION" runat="server" type="hidden" />
- <p>Select a map layer and click describe to get the class definition</p>
+ <p>Select a map layer and click describe to get the properties of that layer and its associated class definition</p>
<p>Layer:</p>
<asp:DropDownList ID="ddlLayers" runat="server" />
<asp:Button ID="btnDescribe" runat="server" Text="Describe"
Modified: trunk/Tools/Maestro/SDK/SamplesWeb/SamplesWeb/Tasks/LayerInfo.aspx.cs
===================================================================
--- trunk/Tools/Maestro/SDK/SamplesWeb/SamplesWeb/Tasks/LayerInfo.aspx.cs 2011-11-30 13:53:57 UTC (rev 6268)
+++ trunk/Tools/Maestro/SDK/SamplesWeb/SamplesWeb/Tasks/LayerInfo.aspx.cs 2011-12-01 14:06:49 UTC (rev 6269)
@@ -81,6 +81,19 @@
StringBuilder sb = new StringBuilder();
+ sb.Append("<h3>Layer Properties</h3><hr/>");
+ sb.Append("<p>Name: " + rtLayer.Name + "</p>");
+ sb.Append("<p>Legend Label: " + rtLayer.LegendLabel + "</p>");
+ sb.Append("<p>Display Level: " + rtLayer.DisplayOrder + "</p>");
+ sb.Append("<p>Expand In Legend: " + rtLayer.ExpandInLegend + "</p>");
+ sb.Append("<p>Show In Legend: " + rtLayer.ShowInLegend + "</p>");
+ sb.Append("<p>Visible: " + rtLayer.Visible + "</p>");
+ sb.Append("<p>Layer Definition: " + rtLayer.LayerDefinitionID + "</p>");
+ sb.Append("<p>Has Tooltips: " + rtLayer.HasTooltips + "</p>");
+ sb.Append("<p>Filter: " + rtLayer.Filter + "</p>");
+
+ sb.Append("<h3>Class Definition</h3><hr/>");
+
sb.Append("<p>Schema: " + clsDef.QualifiedName.Split(':')[0] + "</p>");
sb.Append("<p>Class Name: " + clsDef.Name + "</p>");
sb.Append("<strong>Properties (* indicates identity):</strong>");
More information about the mapguide-commits
mailing list