[mapguide-commits] r6728 - in trunk/Tools/Maestro: Maestro.MapViewer Maestro.TestViewer
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Mon Jun 4 06:15:25 PDT 2012
Author: jng
Date: 2012-06-04 06:15:24 -0700 (Mon, 04 Jun 2012)
New Revision: 6728
Modified:
trunk/Tools/Maestro/Maestro.MapViewer/Legend.cs
trunk/Tools/Maestro/Maestro.MapViewer/MapViewer.cs
trunk/Tools/Maestro/Maestro.TestViewer/MainForm.Designer.cs
trunk/Tools/Maestro/Maestro.TestViewer/MainForm.cs
Log:
#2014: Fix ConvertTiledGroupsToNonTiled behaviour and display of orphaned layers in the legend
Modified: trunk/Tools/Maestro/Maestro.MapViewer/Legend.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.MapViewer/Legend.cs 2012-06-01 17:26:06 UTC (rev 6727)
+++ trunk/Tools/Maestro/Maestro.MapViewer/Legend.cs 2012-06-04 13:15:24 UTC (rev 6728)
@@ -204,7 +204,7 @@
continue;
//Add ones without parents first.
- if (layer.Group != null)
+ if (!string.IsNullOrEmpty(layer.Group))
{
remainingLayers.Add(layer);
}
Modified: trunk/Tools/Maestro/Maestro.MapViewer/MapViewer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.MapViewer/MapViewer.cs 2012-06-01 17:26:06 UTC (rev 6727)
+++ trunk/Tools/Maestro/Maestro.MapViewer/MapViewer.cs 2012-06-04 13:15:24 UTC (rev 6728)
@@ -973,8 +973,13 @@
for (int i = 0; i < groups.Count; i++)
{
var group = groups[i];
- //_provider.MakeGroupNormal(group);
group.Type = RuntimeMapGroup.kNormal;
+
+ var layers = _map.GetLayersOfGroup(group.Name);
+ for (int j = 0; j < layers.Length; j++)
+ {
+ layers[j].Type = RuntimeMapLayer.kDynamic;
+ }
}
}
Modified: trunk/Tools/Maestro/Maestro.TestViewer/MainForm.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.TestViewer/MainForm.Designer.cs 2012-06-01 17:26:06 UTC (rev 6727)
+++ trunk/Tools/Maestro/Maestro.TestViewer/MainForm.Designer.cs 2012-06-04 13:15:24 UTC (rev 6728)
@@ -33,14 +33,14 @@
this.openMapDefinitionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.quitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
- this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.lblCoordinates = new System.Windows.Forms.ToolStripStatusLabel();
this.lblSelected = new System.Windows.Forms.ToolStripStatusLabel();
this.lblScale = new System.Windows.Forms.ToolStripStatusLabel();
+ this.splitContainer1 = new System.Windows.Forms.SplitContainer();
+ this.legend1 = new Maestro.MapViewer.Legend();
this.mapViewer1 = new Maestro.MapViewer.MapViewer();
this.defaultToolbar1 = new Maestro.MapViewer.DefaultToolbar();
this.mapStatusTracker1 = new Maestro.MapViewer.MapStatusTracker();
- this.legend1 = new Maestro.MapViewer.Legend();
this.menuStrip1.SuspendLayout();
this.statusStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
@@ -94,6 +94,23 @@
this.statusStrip1.TabIndex = 2;
this.statusStrip1.Text = "statusStrip1";
//
+ // lblCoordinates
+ //
+ this.lblCoordinates.Name = "lblCoordinates";
+ this.lblCoordinates.Size = new System.Drawing.Size(0, 17);
+ //
+ // lblSelected
+ //
+ this.lblSelected.Name = "lblSelected";
+ this.lblSelected.Size = new System.Drawing.Size(640, 17);
+ this.lblSelected.Spring = true;
+ this.lblSelected.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // lblScale
+ //
+ this.lblScale.Name = "lblScale";
+ this.lblScale.Size = new System.Drawing.Size(0, 17);
+ //
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -112,25 +129,27 @@
this.splitContainer1.SplitterDistance = 217;
this.splitContainer1.TabIndex = 3;
//
- // lblCoordinates
+ // legend1
//
- this.lblCoordinates.Name = "lblCoordinates";
- this.lblCoordinates.Size = new System.Drawing.Size(0, 17);
+ this.legend1.AllowDrop = true;
+ this.legend1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.legend1.GroupContextMenu = null;
+ this.legend1.LayerContextMenu = null;
+ this.legend1.Location = new System.Drawing.Point(0, 0);
+ this.legend1.Name = "legend1";
+ this.legend1.ShowTooltips = false;
+ this.legend1.Size = new System.Drawing.Size(217, 404);
+ this.legend1.TabIndex = 0;
+ this.legend1.ThemeCompressionLimit = 25;
+ this.legend1.Viewer = this.mapViewer1;
+ this.legend1.DragDrop += new System.Windows.Forms.DragEventHandler(this.legend1_DragDrop);
+ this.legend1.DragEnter += new System.Windows.Forms.DragEventHandler(this.legend1_DragEnter);
+ this.legend1.DragOver += new System.Windows.Forms.DragEventHandler(this.legend1_DragOver);
+ this.legend1.DragLeave += new System.EventHandler(this.legend1_DragLeave);
//
- // lblSelected
- //
- this.lblSelected.Name = "lblSelected";
- this.lblSelected.Size = new System.Drawing.Size(640, 17);
- this.lblSelected.Spring = true;
- this.lblSelected.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
- // lblScale
- //
- this.lblScale.Name = "lblScale";
- this.lblScale.Size = new System.Drawing.Size(0, 17);
- //
// mapViewer1
//
+ this.mapViewer1.ConvertTiledGroupsToNonTiled = true;
this.mapViewer1.Cursor = System.Windows.Forms.Cursors.Default;
this.mapViewer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.mapViewer1.Location = new System.Drawing.Point(0, 0);
@@ -159,19 +178,6 @@
this.mapStatusTracker1.SelectedLabel = this.lblSelected;
this.mapStatusTracker1.Viewer = this.mapViewer1;
//
- // legend1
- //
- this.legend1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.legend1.GroupContextMenu = null;
- this.legend1.LayerContextMenu = null;
- this.legend1.Location = new System.Drawing.Point(0, 0);
- this.legend1.Name = "legend1";
- this.legend1.ShowTooltips = false;
- this.legend1.Size = new System.Drawing.Size(217, 404);
- this.legend1.TabIndex = 0;
- this.legend1.ThemeCompressionLimit = 25;
- this.legend1.Viewer = this.mapViewer1;
- //
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
Modified: trunk/Tools/Maestro/Maestro.TestViewer/MainForm.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.TestViewer/MainForm.cs 2012-06-01 17:26:06 UTC (rev 6727)
+++ trunk/Tools/Maestro/Maestro.TestViewer/MainForm.cs 2012-06-04 13:15:24 UTC (rev 6728)
@@ -31,6 +31,7 @@
using OSGeo.MapGuide.ObjectModels.MapDefinition;
using OSGeo.MapGuide.MaestroAPI.Services;
using Maestro.Editors.Generic;
+using System.Diagnostics;
namespace Maestro.TestViewer
{
@@ -91,5 +92,26 @@
var rtMap = mapSvc.CreateMap(mdf);
mapViewer1.LoadMap(rtMap);
}
+
+ private void legend1_DragDrop(object sender, DragEventArgs e)
+ {
+ Trace.TraceInformation("Legend: DragDrop");
+ }
+
+ private void legend1_DragEnter(object sender, DragEventArgs e)
+ {
+ Trace.TraceInformation("Legend: DragEnter");
+ }
+
+ private void legend1_DragLeave(object sender, EventArgs e)
+ {
+ Trace.TraceInformation("Legend: DragLeave");
+ }
+
+ private void legend1_DragOver(object sender, DragEventArgs e)
+ {
+ Trace.TraceInformation("Legend: DragOver");
+ e.Effect = DragDropEffects.Move;
+ }
}
}
More information about the mapguide-commits
mailing list