[mapguide-commits] r5433 - in sandbox/maestro-3.0: Maestro.Editors Maestro.Editors/FeatureSource/Providers Maestro.Editors/FeatureSource/Providers/SQLite Maestro.Editors/Fusion Maestro.Editors/MapDefinition OSGeo.MapGuide.MaestroAPI/ObjectModels OSGeo.MapGuide.MaestroAPI/Resource

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Dec 3 07:34:10 EST 2010


Author: jng
Date: 2010-12-03 04:34:10 -0800 (Fri, 03 Dec 2010)
New Revision: 5433

Added:
   sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/SQLite/
   sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/SQLite/SQLiteFileCtrl.Designer.cs
   sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/SQLite/SQLiteFileCtrl.cs
   sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/SQLite/SQLiteFileCtrl.resx
Modified:
   sandbox/maestro-3.0/Maestro.Editors/FsEditorMap.xml
   sandbox/maestro-3.0/Maestro.Editors/Fusion/FlexibleLayoutEditor.Designer.cs
   sandbox/maestro-3.0/Maestro.Editors/Fusion/MapCtrl.Designer.cs
   sandbox/maestro-3.0/Maestro.Editors/Fusion/MapCtrl.cs
   sandbox/maestro-3.0/Maestro.Editors/Fusion/MapSettingsCtrl.cs
   sandbox/maestro-3.0/Maestro.Editors/Fusion/MapSettingsCtrl.resx
   sandbox/maestro-3.0/Maestro.Editors/Maestro.Editors.csproj
   sandbox/maestro-3.0/Maestro.Editors/MapDefinition/MapSettingsSectionCtrl.cs
   sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/ApplicationDefinition.cs
   sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/ApplicationDefinitionInterfaces.cs
   sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Resource/IResource.cs
Log:
3.0 sandbox changes:
 - Fusion Editor: Add support for configuring commercial map layers in Fusion Flexible Layouts
 - MapDefinition Editor: Use "manual" data binding for initial extents, as databinding will reject input on entering a "."
 - #1548: Add specialized feature source editor for SQLite

Added: sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/SQLite/SQLiteFileCtrl.Designer.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/SQLite/SQLiteFileCtrl.Designer.cs	                        (rev 0)
+++ sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/SQLite/SQLiteFileCtrl.Designer.cs	2010-12-03 12:34:10 UTC (rev 5433)
@@ -0,0 +1,70 @@
+namespace Maestro.Editors.FeatureSource.Providers.SQLite
+{
+    partial class SQLiteFileCtrl
+    {
+        /// <summary> 
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Component Designer generated code
+
+        /// <summary> 
+        /// Required method for Designer support - do not modify 
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.chkUseFdoMetadata = new System.Windows.Forms.CheckBox();
+            this.contentPanel.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // contentPanel
+            // 
+            this.contentPanel.Controls.Add(this.chkUseFdoMetadata);
+            this.contentPanel.Controls.SetChildIndex(this.chkUseFdoMetadata, 0);
+            this.contentPanel.Controls.SetChildIndex(this.resDataCtrl, 0);
+            this.contentPanel.Controls.SetChildIndex(this.rdManaged, 0);
+            this.contentPanel.Controls.SetChildIndex(this.rdUnmanaged, 0);
+            // 
+            // chkUseFdoMetadata
+            // 
+            this.chkUseFdoMetadata.AutoSize = true;
+            this.chkUseFdoMetadata.Location = new System.Drawing.Point(25, 236);
+            this.chkUseFdoMetadata.Name = "chkUseFdoMetadata";
+            this.chkUseFdoMetadata.Size = new System.Drawing.Size(118, 17);
+            this.chkUseFdoMetadata.TabIndex = 9;
+            this.chkUseFdoMetadata.Text = "Use FDO Metadata";
+            this.chkUseFdoMetadata.UseVisualStyleBackColor = true;
+            this.chkUseFdoMetadata.CheckedChanged += new System.EventHandler(this.chkUseFdoMetadata_CheckedChanged);
+            // 
+            // SQLiteFileCtrl
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.HeaderText = "SQLite Feature Source";
+            this.Name = "SQLiteFileCtrl";
+            this.contentPanel.ResumeLayout(false);
+            this.contentPanel.PerformLayout();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.CheckBox chkUseFdoMetadata;
+    }
+}

Added: sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/SQLite/SQLiteFileCtrl.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/SQLite/SQLiteFileCtrl.cs	                        (rev 0)
+++ sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/SQLite/SQLiteFileCtrl.cs	2010-12-03 12:34:10 UTC (rev 5433)
@@ -0,0 +1,97 @@
+#region Disclaimer / License
+// Copyright (C) 2010, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// 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 Street, Fifth Floor, Boston, MA  02110-1301  USA
+// 
+#endregion
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using OSGeo.MapGuide.ObjectModels.FeatureSource;
+using System.Diagnostics;
+
+namespace Maestro.Editors.FeatureSource.Providers.SQLite
+{
+    internal partial class SQLiteFileCtrl : FileBasedCtrl
+    {
+        public SQLiteFileCtrl()
+        {
+            InitializeComponent();
+        }
+
+        private IFeatureSource _fs;
+
+        public override void Bind(IEditorService service)
+        {
+            base.Bind(service);
+            _fs = service.GetEditedResource() as IFeatureSource;
+            Debug.Assert(_fs != null);
+
+            MarkSelected();
+
+            //HACK: Set UseFdoMetadata property if not specified otherwise this will be an invalid feature source
+            if (string.IsNullOrEmpty(_fs.GetConnectionProperty("UseFdoMetadata")))
+                _fs.SetConnectionProperty("UseFdoMetadata", "FALSE");
+
+            chkUseFdoMetadata.Checked = _fs.GetConnectionProperty("UseFdoMetadata").ToUpper().Equals(true.ToString().ToUpper());
+        }
+
+        private void MarkSelected()
+        {
+            var file = _fs.GetConnectionProperty("File");
+            if (!string.IsNullOrEmpty(file))
+            {
+                if (_fs.UsesEmbeddedDataFiles)
+                {
+                    rdManaged.Checked = true;
+                    var df = _fs.GetEmbeddedDataName();
+                    resDataCtrl.MarkedFile = df;
+                }
+                else if (_fs.UsesAliasedDataFiles)
+                {
+                    rdUnmanaged.Checked = true;
+                    txtAlias.Text = file;
+                }
+            }
+        }
+
+        protected override void OnResourceChanged()
+        {
+            base.OnResourceChanged();
+            MarkSelected();
+        }
+
+        protected override void OnResourceMarked(string dataName)
+        {
+            string fileProp = "%MG_DATA_FILE_PATH%" + dataName;
+            string currFileProp = _fs.GetConnectionProperty("File");
+            if (!currFileProp.Equals(fileProp))
+                _fs.SetConnectionProperty("File", fileProp);
+        }
+
+        private void chkUseFdoMetadata_CheckedChanged(object sender, EventArgs e)
+        {
+            var newValue = chkUseFdoMetadata.Checked.ToString().ToUpper();
+            var currValue = _fs.GetConnectionProperty("UseFdoMetadata");
+            if (!newValue.Equals(currValue))
+                _fs.SetConnectionProperty("UseFdoMetadata", newValue);
+        }
+    }
+}

Added: sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/SQLite/SQLiteFileCtrl.resx
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/SQLite/SQLiteFileCtrl.resx	                        (rev 0)
+++ sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/SQLite/SQLiteFileCtrl.resx	2010-12-03 12:34:10 UTC (rev 5433)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
\ No newline at end of file

Modified: sandbox/maestro-3.0/Maestro.Editors/FsEditorMap.xml
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/FsEditorMap.xml	2010-12-02 20:00:05 UTC (rev 5432)
+++ sandbox/maestro-3.0/Maestro.Editors/FsEditorMap.xml	2010-12-03 12:34:10 UTC (rev 5433)
@@ -7,6 +7,7 @@
 -->
 <FeatureSourceEditorMap>
     <Editor provider="OSGeo.SDF" type="Maestro.Editors.FeatureSource.Providers.Sdf.SdfFileCtrl" />
+    <Editor provider="OSGeo.SQLite" type="Maestro.Editors.FeatureSource.Providers.SQLite.SQLiteFileCtrl" />
     <Editor provider="OSGeo.SHP" type="Maestro.Editors.FeatureSource.Providers.Shp.ShpFileCtrl" />
     <Editor provider="OSGeo.SQLServerSpatial" type="Maestro.Editors.FeatureSource.Providers.Rdbms.SqlServerSpatialCtrl" />
     <Editor provider="OSGeo.MySQL" type="Maestro.Editors.FeatureSource.Providers.Rdbms.MySqlCtrl" />

Modified: sandbox/maestro-3.0/Maestro.Editors/Fusion/FlexibleLayoutEditor.Designer.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/Fusion/FlexibleLayoutEditor.Designer.cs	2010-12-02 20:00:05 UTC (rev 5432)
+++ sandbox/maestro-3.0/Maestro.Editors/Fusion/FlexibleLayoutEditor.Designer.cs	2010-12-03 12:34:10 UTC (rev 5433)
@@ -42,7 +42,7 @@
             this.settingsCtrl.HeaderText = "Flexible Layout Settings";
             this.settingsCtrl.Location = new System.Drawing.Point(0, 0);
             this.settingsCtrl.Name = "settingsCtrl";
-            this.settingsCtrl.Size = new System.Drawing.Size(746, 238);
+            this.settingsCtrl.Size = new System.Drawing.Size(714, 238);
             this.settingsCtrl.TabIndex = 0;
             // 
             // mapsCtrl
@@ -54,7 +54,7 @@
             this.mapsCtrl.HeaderText = "Maps";
             this.mapsCtrl.Location = new System.Drawing.Point(0, 238);
             this.mapsCtrl.Name = "mapsCtrl";
-            this.mapsCtrl.Size = new System.Drawing.Size(746, 290);
+            this.mapsCtrl.Size = new System.Drawing.Size(714, 490);
             this.mapsCtrl.TabIndex = 1;
             // 
             // widgetsCtrl
@@ -64,9 +64,9 @@
             this.widgetsCtrl.HeaderBackgroundColor = System.Drawing.Color.LightSteelBlue;
             this.widgetsCtrl.HeaderFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.widgetsCtrl.HeaderText = "Widgets";
-            this.widgetsCtrl.Location = new System.Drawing.Point(0, 528);
+            this.widgetsCtrl.Location = new System.Drawing.Point(0, 728);
             this.widgetsCtrl.Name = "widgetsCtrl";
-            this.widgetsCtrl.Size = new System.Drawing.Size(746, 319);
+            this.widgetsCtrl.Size = new System.Drawing.Size(714, 319);
             this.widgetsCtrl.TabIndex = 2;
             // 
             // FlexibleLayoutEditor
@@ -78,7 +78,7 @@
             this.Controls.Add(this.mapsCtrl);
             this.Controls.Add(this.settingsCtrl);
             this.Name = "FlexibleLayoutEditor";
-            this.Size = new System.Drawing.Size(746, 574);
+            this.Size = new System.Drawing.Size(714, 574);
             this.ResumeLayout(false);
 
         }

Modified: sandbox/maestro-3.0/Maestro.Editors/Fusion/MapCtrl.Designer.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/Fusion/MapCtrl.Designer.cs	2010-12-02 20:00:05 UTC (rev 5432)
+++ sandbox/maestro-3.0/Maestro.Editors/Fusion/MapCtrl.Designer.cs	2010-12-03 12:34:10 UTC (rev 5433)
@@ -29,146 +29,451 @@
         private void InitializeComponent()
         {
             this.label1 = new System.Windows.Forms.Label();
-            this.textBox1 = new System.Windows.Forms.TextBox();
+            this.txtMapId = new System.Windows.Forms.TextBox();
             this.groupBox1 = new System.Windows.Forms.GroupBox();
+            this.chkOverride = new System.Windows.Forms.CheckBox();
+            this.txtViewScale = new System.Windows.Forms.TextBox();
+            this.txtViewY = new System.Windows.Forms.TextBox();
+            this.txtViewX = new System.Windows.Forms.TextBox();
+            this.label4 = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
-            this.label3 = new System.Windows.Forms.Label();
-            this.label4 = new System.Windows.Forms.Label();
-            this.txtViewX = new System.Windows.Forms.TextBox();
-            this.txtViewY = new System.Windows.Forms.TextBox();
-            this.txtViewScale = new System.Windows.Forms.TextBox();
+            this.label5 = new System.Windows.Forms.Label();
+            this.txtMapDefinition = new System.Windows.Forms.TextBox();
+            this.btnBrowseMdf = new System.Windows.Forms.Button();
+            this.chkSingleTiled = new System.Windows.Forms.CheckBox();
+            this.lblSelColor = new System.Windows.Forms.Label();
+            this.chkSelectionAsOverlay = new System.Windows.Forms.CheckBox();
             this.groupBox2 = new System.Windows.Forms.GroupBox();
-            this.listBox1 = new System.Windows.Forms.ListBox();
+            this.cmbSelectionColor = new Maestro.Editors.Common.ColorComboBox();
+            this.grpCms = new System.Windows.Forms.GroupBox();
+            this.groupBox5 = new System.Windows.Forms.GroupBox();
+            this.chkGoogStreets = new System.Windows.Forms.CheckBox();
+            this.chkGoogSatellite = new System.Windows.Forms.CheckBox();
+            this.chkGoogHybrid = new System.Windows.Forms.CheckBox();
+            this.groupBox4 = new System.Windows.Forms.GroupBox();
+            this.chkBingStreets = new System.Windows.Forms.CheckBox();
+            this.chkBingSatellite = new System.Windows.Forms.CheckBox();
+            this.chkBingHybrid = new System.Windows.Forms.CheckBox();
+            this.groupBox3 = new System.Windows.Forms.GroupBox();
+            this.chkYahooStreets = new System.Windows.Forms.CheckBox();
+            this.chkYahooSatellite = new System.Windows.Forms.CheckBox();
+            this.chkYahooHybrid = new System.Windows.Forms.CheckBox();
+            this.txtYahooApiKey = new System.Windows.Forms.TextBox();
+            this.txtGoogApiKey = new System.Windows.Forms.TextBox();
+            this.label7 = new System.Windows.Forms.Label();
+            this.label6 = new System.Windows.Forms.Label();
             this.groupBox1.SuspendLayout();
             this.groupBox2.SuspendLayout();
+            this.grpCms.SuspendLayout();
+            this.groupBox5.SuspendLayout();
+            this.groupBox4.SuspendLayout();
+            this.groupBox3.SuspendLayout();
             this.SuspendLayout();
             // 
             // label1
             // 
             this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(27, 18);
+            this.label1.Location = new System.Drawing.Point(14, 22);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(42, 13);
             this.label1.TabIndex = 0;
             this.label1.Text = "Map ID";
             // 
-            // textBox1
+            // txtMapId
             // 
-            this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            this.txtMapId.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                         | System.Windows.Forms.AnchorStyles.Right)));
-            this.textBox1.Location = new System.Drawing.Point(95, 15);
-            this.textBox1.Name = "textBox1";
-            this.textBox1.Size = new System.Drawing.Size(359, 20);
-            this.textBox1.TabIndex = 1;
+            this.txtMapId.Location = new System.Drawing.Point(107, 19);
+            this.txtMapId.Name = "txtMapId";
+            this.txtMapId.Size = new System.Drawing.Size(359, 20);
+            this.txtMapId.TabIndex = 1;
             // 
             // groupBox1
             // 
             this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                         | System.Windows.Forms.AnchorStyles.Right)));
+            this.groupBox1.Controls.Add(this.chkOverride);
             this.groupBox1.Controls.Add(this.txtViewScale);
             this.groupBox1.Controls.Add(this.txtViewY);
             this.groupBox1.Controls.Add(this.txtViewX);
             this.groupBox1.Controls.Add(this.label4);
             this.groupBox1.Controls.Add(this.label3);
             this.groupBox1.Controls.Add(this.label2);
-            this.groupBox1.Location = new System.Drawing.Point(20, 53);
+            this.groupBox1.Location = new System.Drawing.Point(17, 75);
             this.groupBox1.Name = "groupBox1";
-            this.groupBox1.Size = new System.Drawing.Size(449, 106);
+            this.groupBox1.Size = new System.Drawing.Size(449, 56);
             this.groupBox1.TabIndex = 2;
             this.groupBox1.TabStop = false;
-            this.groupBox1.Text = "Initial View";
             // 
-            // label2
+            // chkOverride
             // 
-            this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(42, 39);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(14, 13);
-            this.label2.TabIndex = 0;
-            this.label2.Text = "X";
+            this.chkOverride.AutoSize = true;
+            this.chkOverride.Location = new System.Drawing.Point(6, 0);
+            this.chkOverride.Name = "chkOverride";
+            this.chkOverride.Size = new System.Drawing.Size(119, 17);
+            this.chkOverride.TabIndex = 6;
+            this.chkOverride.Text = "Override Initial View";
+            this.chkOverride.UseVisualStyleBackColor = true;
+            this.chkOverride.CheckedChanged += new System.EventHandler(this.chkOverride_CheckedChanged);
             // 
-            // label3
+            // txtViewScale
             // 
-            this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(191, 39);
-            this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(14, 13);
-            this.label3.TabIndex = 1;
-            this.label3.Text = "Y";
+            this.txtViewScale.Location = new System.Drawing.Point(321, 23);
+            this.txtViewScale.Name = "txtViewScale";
+            this.txtViewScale.Size = new System.Drawing.Size(92, 20);
+            this.txtViewScale.TabIndex = 5;
             // 
+            // txtViewY
+            // 
+            this.txtViewY.Location = new System.Drawing.Point(180, 23);
+            this.txtViewY.Name = "txtViewY";
+            this.txtViewY.Size = new System.Drawing.Size(80, 20);
+            this.txtViewY.TabIndex = 4;
+            // 
+            // txtViewX
+            // 
+            this.txtViewX.Location = new System.Drawing.Point(54, 23);
+            this.txtViewX.Name = "txtViewX";
+            this.txtViewX.Size = new System.Drawing.Size(80, 20);
+            this.txtViewX.TabIndex = 3;
+            // 
             // label4
             // 
             this.label4.AutoSize = true;
-            this.label4.Location = new System.Drawing.Point(35, 65);
+            this.label4.Location = new System.Drawing.Point(272, 26);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(34, 13);
             this.label4.TabIndex = 2;
             this.label4.Text = "Scale";
             // 
-            // txtViewX
+            // label3
             // 
-            this.txtViewX.Location = new System.Drawing.Point(75, 36);
-            this.txtViewX.Name = "txtViewX";
-            this.txtViewX.Size = new System.Drawing.Size(80, 20);
-            this.txtViewX.TabIndex = 3;
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(148, 26);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(14, 13);
+            this.label3.TabIndex = 1;
+            this.label3.Text = "Y";
             // 
-            // txtViewY
+            // label2
             // 
-            this.txtViewY.Location = new System.Drawing.Point(223, 36);
-            this.txtViewY.Name = "txtViewY";
-            this.txtViewY.Size = new System.Drawing.Size(80, 20);
-            this.txtViewY.TabIndex = 4;
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(21, 26);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(14, 13);
+            this.label2.TabIndex = 0;
+            this.label2.Text = "X";
             // 
-            // txtViewScale
+            // label5
             // 
-            this.txtViewScale.Location = new System.Drawing.Point(75, 62);
-            this.txtViewScale.Name = "txtViewScale";
-            this.txtViewScale.Size = new System.Drawing.Size(80, 20);
-            this.txtViewScale.TabIndex = 5;
+            this.label5.AutoSize = true;
+            this.label5.Location = new System.Drawing.Point(14, 51);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(75, 13);
+            this.label5.TabIndex = 3;
+            this.label5.Text = "Map Definition";
             // 
+            // txtMapDefinition
+            // 
+            this.txtMapDefinition.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.txtMapDefinition.Location = new System.Drawing.Point(107, 48);
+            this.txtMapDefinition.Name = "txtMapDefinition";
+            this.txtMapDefinition.ReadOnly = true;
+            this.txtMapDefinition.Size = new System.Drawing.Size(324, 20);
+            this.txtMapDefinition.TabIndex = 4;
+            // 
+            // btnBrowseMdf
+            // 
+            this.btnBrowseMdf.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnBrowseMdf.Location = new System.Drawing.Point(437, 46);
+            this.btnBrowseMdf.Name = "btnBrowseMdf";
+            this.btnBrowseMdf.Size = new System.Drawing.Size(29, 23);
+            this.btnBrowseMdf.TabIndex = 5;
+            this.btnBrowseMdf.Text = "...";
+            this.btnBrowseMdf.UseVisualStyleBackColor = true;
+            this.btnBrowseMdf.Click += new System.EventHandler(this.btnBrowseMdf_Click);
+            // 
+            // chkSingleTiled
+            // 
+            this.chkSingleTiled.AutoSize = true;
+            this.chkSingleTiled.Location = new System.Drawing.Point(234, 139);
+            this.chkSingleTiled.Name = "chkSingleTiled";
+            this.chkSingleTiled.Size = new System.Drawing.Size(75, 17);
+            this.chkSingleTiled.TabIndex = 8;
+            this.chkSingleTiled.Text = "Single Tile";
+            this.chkSingleTiled.UseVisualStyleBackColor = true;
+            // 
+            // lblSelColor
+            // 
+            this.lblSelColor.AutoSize = true;
+            this.lblSelColor.Location = new System.Drawing.Point(17, 140);
+            this.lblSelColor.Name = "lblSelColor";
+            this.lblSelColor.Size = new System.Drawing.Size(78, 13);
+            this.lblSelColor.TabIndex = 9;
+            this.lblSelColor.Text = "Selection Color";
+            // 
+            // chkSelectionAsOverlay
+            // 
+            this.chkSelectionAsOverlay.AutoSize = true;
+            this.chkSelectionAsOverlay.Location = new System.Drawing.Point(327, 139);
+            this.chkSelectionAsOverlay.Name = "chkSelectionAsOverlay";
+            this.chkSelectionAsOverlay.Size = new System.Drawing.Size(124, 17);
+            this.chkSelectionAsOverlay.TabIndex = 11;
+            this.chkSelectionAsOverlay.Text = "Selection As Overlay";
+            this.chkSelectionAsOverlay.UseVisualStyleBackColor = true;
+            // 
             // groupBox2
             // 
-            this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                        | System.Windows.Forms.AnchorStyles.Right)));
-            this.groupBox2.Controls.Add(this.listBox1);
-            this.groupBox2.Location = new System.Drawing.Point(20, 166);
+            this.groupBox2.Controls.Add(this.txtMapId);
+            this.groupBox2.Controls.Add(this.chkSelectionAsOverlay);
+            this.groupBox2.Controls.Add(this.label1);
+            this.groupBox2.Controls.Add(this.cmbSelectionColor);
+            this.groupBox2.Controls.Add(this.groupBox1);
+            this.groupBox2.Controls.Add(this.lblSelColor);
+            this.groupBox2.Controls.Add(this.label5);
+            this.groupBox2.Controls.Add(this.chkSingleTiled);
+            this.groupBox2.Controls.Add(this.txtMapDefinition);
+            this.groupBox2.Controls.Add(this.btnBrowseMdf);
+            this.groupBox2.Location = new System.Drawing.Point(3, 3);
             this.groupBox2.Name = "groupBox2";
-            this.groupBox2.Size = new System.Drawing.Size(449, 125);
-            this.groupBox2.TabIndex = 3;
+            this.groupBox2.Size = new System.Drawing.Size(486, 176);
+            this.groupBox2.TabIndex = 12;
             this.groupBox2.TabStop = false;
-            this.groupBox2.Text = "Maps In Group";
+            this.groupBox2.Text = "Map Settings";
             // 
-            // listBox1
+            // cmbSelectionColor
             // 
-            this.listBox1.Dock = System.Windows.Forms.DockStyle.Left;
-            this.listBox1.FormattingEnabled = true;
-            this.listBox1.Location = new System.Drawing.Point(3, 16);
-            this.listBox1.Name = "listBox1";
-            this.listBox1.Size = new System.Drawing.Size(300, 95);
-            this.listBox1.TabIndex = 0;
+            this.cmbSelectionColor.FormattingEnabled = true;
+            this.cmbSelectionColor.Location = new System.Drawing.Point(107, 137);
+            this.cmbSelectionColor.Name = "cmbSelectionColor";
+            this.cmbSelectionColor.Size = new System.Drawing.Size(121, 21);
+            this.cmbSelectionColor.TabIndex = 10;
             // 
+            // grpCms
+            // 
+            this.grpCms.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.grpCms.Controls.Add(this.groupBox5);
+            this.grpCms.Controls.Add(this.groupBox4);
+            this.grpCms.Controls.Add(this.groupBox3);
+            this.grpCms.Controls.Add(this.txtYahooApiKey);
+            this.grpCms.Controls.Add(this.txtGoogApiKey);
+            this.grpCms.Controls.Add(this.label7);
+            this.grpCms.Controls.Add(this.label6);
+            this.grpCms.Location = new System.Drawing.Point(3, 185);
+            this.grpCms.Name = "grpCms";
+            this.grpCms.Size = new System.Drawing.Size(486, 278);
+            this.grpCms.TabIndex = 13;
+            this.grpCms.TabStop = false;
+            this.grpCms.Text = "Commercial Map Service Layers (Check the ones you want available)";
+            // 
+            // groupBox5
+            // 
+            this.groupBox5.Controls.Add(this.chkGoogStreets);
+            this.groupBox5.Controls.Add(this.chkGoogSatellite);
+            this.groupBox5.Controls.Add(this.chkGoogHybrid);
+            this.groupBox5.Location = new System.Drawing.Point(132, 30);
+            this.groupBox5.Name = "groupBox5";
+            this.groupBox5.Size = new System.Drawing.Size(96, 90);
+            this.groupBox5.TabIndex = 15;
+            this.groupBox5.TabStop = false;
+            this.groupBox5.Text = "Google Maps";
+            // 
+            // chkGoogStreets
+            // 
+            this.chkGoogStreets.AutoSize = true;
+            this.chkGoogStreets.Location = new System.Drawing.Point(11, 19);
+            this.chkGoogStreets.Name = "chkGoogStreets";
+            this.chkGoogStreets.Size = new System.Drawing.Size(59, 17);
+            this.chkGoogStreets.TabIndex = 6;
+            this.chkGoogStreets.Text = "Streets";
+            this.chkGoogStreets.UseVisualStyleBackColor = true;
+            this.chkGoogStreets.CheckedChanged += new System.EventHandler(this.chkGoogStreets_CheckedChanged);
+            // 
+            // chkGoogSatellite
+            // 
+            this.chkGoogSatellite.AutoSize = true;
+            this.chkGoogSatellite.Location = new System.Drawing.Point(11, 43);
+            this.chkGoogSatellite.Name = "chkGoogSatellite";
+            this.chkGoogSatellite.Size = new System.Drawing.Size(63, 17);
+            this.chkGoogSatellite.TabIndex = 7;
+            this.chkGoogSatellite.Text = "Satellite";
+            this.chkGoogSatellite.UseVisualStyleBackColor = true;
+            this.chkGoogSatellite.CheckedChanged += new System.EventHandler(this.chkGoogSatellite_CheckedChanged);
+            // 
+            // chkGoogHybrid
+            // 
+            this.chkGoogHybrid.AutoSize = true;
+            this.chkGoogHybrid.Location = new System.Drawing.Point(11, 66);
+            this.chkGoogHybrid.Name = "chkGoogHybrid";
+            this.chkGoogHybrid.Size = new System.Drawing.Size(56, 17);
+            this.chkGoogHybrid.TabIndex = 8;
+            this.chkGoogHybrid.Text = "Hybrid";
+            this.chkGoogHybrid.UseVisualStyleBackColor = true;
+            this.chkGoogHybrid.CheckedChanged += new System.EventHandler(this.chkGoogHybrid_CheckedChanged);
+            // 
+            // groupBox4
+            // 
+            this.groupBox4.Controls.Add(this.chkBingStreets);
+            this.groupBox4.Controls.Add(this.chkBingSatellite);
+            this.groupBox4.Controls.Add(this.chkBingHybrid);
+            this.groupBox4.Location = new System.Drawing.Point(23, 30);
+            this.groupBox4.Name = "groupBox4";
+            this.groupBox4.Size = new System.Drawing.Size(99, 90);
+            this.groupBox4.TabIndex = 14;
+            this.groupBox4.TabStop = false;
+            this.groupBox4.Text = "Bing Maps";
+            // 
+            // chkBingStreets
+            // 
+            this.chkBingStreets.AutoSize = true;
+            this.chkBingStreets.Location = new System.Drawing.Point(13, 19);
+            this.chkBingStreets.Name = "chkBingStreets";
+            this.chkBingStreets.Size = new System.Drawing.Size(59, 17);
+            this.chkBingStreets.TabIndex = 0;
+            this.chkBingStreets.Text = "Streets";
+            this.chkBingStreets.UseVisualStyleBackColor = true;
+            this.chkBingStreets.CheckedChanged += new System.EventHandler(this.chkBingStreets_CheckedChanged);
+            // 
+            // chkBingSatellite
+            // 
+            this.chkBingSatellite.AutoSize = true;
+            this.chkBingSatellite.Location = new System.Drawing.Point(13, 43);
+            this.chkBingSatellite.Name = "chkBingSatellite";
+            this.chkBingSatellite.Size = new System.Drawing.Size(63, 17);
+            this.chkBingSatellite.TabIndex = 1;
+            this.chkBingSatellite.Text = "Satellite";
+            this.chkBingSatellite.UseVisualStyleBackColor = true;
+            this.chkBingSatellite.CheckedChanged += new System.EventHandler(this.chkBingSatellite_CheckedChanged);
+            // 
+            // chkBingHybrid
+            // 
+            this.chkBingHybrid.AutoSize = true;
+            this.chkBingHybrid.Location = new System.Drawing.Point(13, 66);
+            this.chkBingHybrid.Name = "chkBingHybrid";
+            this.chkBingHybrid.Size = new System.Drawing.Size(56, 17);
+            this.chkBingHybrid.TabIndex = 2;
+            this.chkBingHybrid.Text = "Hybrid";
+            this.chkBingHybrid.UseVisualStyleBackColor = true;
+            this.chkBingHybrid.CheckedChanged += new System.EventHandler(this.chkBingHybrid_CheckedChanged);
+            // 
+            // groupBox3
+            // 
+            this.groupBox3.Controls.Add(this.chkYahooStreets);
+            this.groupBox3.Controls.Add(this.chkYahooSatellite);
+            this.groupBox3.Controls.Add(this.chkYahooHybrid);
+            this.groupBox3.Location = new System.Drawing.Point(234, 30);
+            this.groupBox3.Name = "groupBox3";
+            this.groupBox3.Size = new System.Drawing.Size(103, 90);
+            this.groupBox3.TabIndex = 13;
+            this.groupBox3.TabStop = false;
+            this.groupBox3.Text = "Yahoo! Maps";
+            // 
+            // chkYahooStreets
+            // 
+            this.chkYahooStreets.AutoSize = true;
+            this.chkYahooStreets.Location = new System.Drawing.Point(11, 19);
+            this.chkYahooStreets.Name = "chkYahooStreets";
+            this.chkYahooStreets.Size = new System.Drawing.Size(59, 17);
+            this.chkYahooStreets.TabIndex = 3;
+            this.chkYahooStreets.Text = "Streets";
+            this.chkYahooStreets.UseVisualStyleBackColor = true;
+            this.chkYahooStreets.CheckedChanged += new System.EventHandler(this.chkYahooStreets_CheckedChanged);
+            // 
+            // chkYahooSatellite
+            // 
+            this.chkYahooSatellite.AutoSize = true;
+            this.chkYahooSatellite.Location = new System.Drawing.Point(11, 43);
+            this.chkYahooSatellite.Name = "chkYahooSatellite";
+            this.chkYahooSatellite.Size = new System.Drawing.Size(63, 17);
+            this.chkYahooSatellite.TabIndex = 4;
+            this.chkYahooSatellite.Text = "Satellite";
+            this.chkYahooSatellite.UseVisualStyleBackColor = true;
+            this.chkYahooSatellite.CheckedChanged += new System.EventHandler(this.chkYahooSatellite_CheckedChanged);
+            // 
+            // chkYahooHybrid
+            // 
+            this.chkYahooHybrid.AutoSize = true;
+            this.chkYahooHybrid.Location = new System.Drawing.Point(11, 66);
+            this.chkYahooHybrid.Name = "chkYahooHybrid";
+            this.chkYahooHybrid.Size = new System.Drawing.Size(56, 17);
+            this.chkYahooHybrid.TabIndex = 5;
+            this.chkYahooHybrid.Text = "Hybrid";
+            this.chkYahooHybrid.UseVisualStyleBackColor = true;
+            this.chkYahooHybrid.CheckedChanged += new System.EventHandler(this.chkYahooHybrid_CheckedChanged);
+            // 
+            // txtYahooApiKey
+            // 
+            this.txtYahooApiKey.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.txtYahooApiKey.Enabled = false;
+            this.txtYahooApiKey.Location = new System.Drawing.Point(23, 216);
+            this.txtYahooApiKey.Multiline = true;
+            this.txtYahooApiKey.Name = "txtYahooApiKey";
+            this.txtYahooApiKey.Size = new System.Drawing.Size(442, 36);
+            this.txtYahooApiKey.TabIndex = 12;
+            this.txtYahooApiKey.TextChanged += new System.EventHandler(this.txtYahooApiKey_TextChanged);
+            // 
+            // txtGoogApiKey
+            // 
+            this.txtGoogApiKey.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.txtGoogApiKey.Enabled = false;
+            this.txtGoogApiKey.Location = new System.Drawing.Point(23, 150);
+            this.txtGoogApiKey.Multiline = true;
+            this.txtGoogApiKey.Name = "txtGoogApiKey";
+            this.txtGoogApiKey.Size = new System.Drawing.Size(442, 36);
+            this.txtGoogApiKey.TabIndex = 11;
+            this.txtGoogApiKey.TextChanged += new System.EventHandler(this.txtGoogApiKey_TextChanged);
+            // 
+            // label7
+            // 
+            this.label7.AutoSize = true;
+            this.label7.Location = new System.Drawing.Point(20, 200);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(243, 13);
+            this.label7.TabIndex = 10;
+            this.label7.Text = "Yahoo Maps API Key (Required for Yahoo Layers)";
+            // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Location = new System.Drawing.Point(20, 134);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(249, 13);
+            this.label6.TabIndex = 9;
+            this.label6.Text = "Google Maps API Key (Required for Google Layers)";
+            // 
             // MapCtrl
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.grpCms);
             this.Controls.Add(this.groupBox2);
-            this.Controls.Add(this.groupBox1);
-            this.Controls.Add(this.textBox1);
-            this.Controls.Add(this.label1);
             this.Name = "MapCtrl";
-            this.Size = new System.Drawing.Size(492, 308);
+            this.Size = new System.Drawing.Size(492, 466);
             this.groupBox1.ResumeLayout(false);
             this.groupBox1.PerformLayout();
             this.groupBox2.ResumeLayout(false);
+            this.groupBox2.PerformLayout();
+            this.grpCms.ResumeLayout(false);
+            this.grpCms.PerformLayout();
+            this.groupBox5.ResumeLayout(false);
+            this.groupBox5.PerformLayout();
+            this.groupBox4.ResumeLayout(false);
+            this.groupBox4.PerformLayout();
+            this.groupBox3.ResumeLayout(false);
+            this.groupBox3.PerformLayout();
             this.ResumeLayout(false);
-            this.PerformLayout();
 
         }
 
         #endregion
 
         private System.Windows.Forms.Label label1;
-        private System.Windows.Forms.TextBox textBox1;
+        private System.Windows.Forms.TextBox txtMapId;
         private System.Windows.Forms.GroupBox groupBox1;
         private System.Windows.Forms.TextBox txtViewScale;
         private System.Windows.Forms.TextBox txtViewY;
@@ -176,7 +481,31 @@
         private System.Windows.Forms.Label label4;
         private System.Windows.Forms.Label label3;
         private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.TextBox txtMapDefinition;
+        private System.Windows.Forms.Button btnBrowseMdf;
+        private System.Windows.Forms.CheckBox chkOverride;
+        private System.Windows.Forms.CheckBox chkSingleTiled;
+        private System.Windows.Forms.Label lblSelColor;
+        private Maestro.Editors.Common.ColorComboBox cmbSelectionColor;
+        private System.Windows.Forms.CheckBox chkSelectionAsOverlay;
         private System.Windows.Forms.GroupBox groupBox2;
-        private System.Windows.Forms.ListBox listBox1;
+        private System.Windows.Forms.GroupBox grpCms;
+        private System.Windows.Forms.CheckBox chkGoogHybrid;
+        private System.Windows.Forms.CheckBox chkGoogSatellite;
+        private System.Windows.Forms.CheckBox chkGoogStreets;
+        private System.Windows.Forms.CheckBox chkYahooHybrid;
+        private System.Windows.Forms.CheckBox chkYahooSatellite;
+        private System.Windows.Forms.CheckBox chkYahooStreets;
+        private System.Windows.Forms.CheckBox chkBingHybrid;
+        private System.Windows.Forms.CheckBox chkBingSatellite;
+        private System.Windows.Forms.CheckBox chkBingStreets;
+        private System.Windows.Forms.TextBox txtGoogApiKey;
+        private System.Windows.Forms.Label label7;
+        private System.Windows.Forms.Label label6;
+        private System.Windows.Forms.TextBox txtYahooApiKey;
+        private System.Windows.Forms.GroupBox groupBox5;
+        private System.Windows.Forms.GroupBox groupBox4;
+        private System.Windows.Forms.GroupBox groupBox3;
     }
 }

Modified: sandbox/maestro-3.0/Maestro.Editors/Fusion/MapCtrl.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/Fusion/MapCtrl.cs	2010-12-02 20:00:05 UTC (rev 5432)
+++ sandbox/maestro-3.0/Maestro.Editors/Fusion/MapCtrl.cs	2010-12-03 12:34:10 UTC (rev 5433)
@@ -25,21 +25,397 @@
 using System.Text;
 using System.Windows.Forms;
 using OSGeo.MapGuide.ObjectModels.ApplicationDefinition;
+using Maestro.Shared.UI;
+using System.Globalization;
+using System.Collections.Specialized;
+using OSGeo.MapGuide.MaestroAPI;
+using Maestro.Editors.Generic;
+using OSGeo.MapGuide.MaestroAPI.Services;
+using System.Diagnostics;
 
 namespace Maestro.Editors.Fusion
 {
     public partial class MapCtrl : UserControl
     {
-        public MapCtrl()
+        const string G_NORMAL_MAP = "G_NORMAL_MAP";
+        const string G_SATELLITE_MAP = "G_SATELLITE_MAP";
+        const string G_HYBRID_MAP = "G_HYBRID_MAP";
+
+        const string YAHOO_MAP_REG = "YAHOO_MAP_REG";
+        const string YAHOO_MAP_SAT = "YAHOO_MAP_SAT";
+        const string YAHOO_MAP_HYB = "YAHOO_MAP_HYB";
+
+        const string BING_ROAD = "Road";
+        const string BING_AERIAL = "Aerial";
+        const string BING_HYBRID = "Hybrid";
+
+        const string Type_Google = "Google";
+        const string Type_Yahoo = "Yahoo";
+        const string Type_Bing = "VirtualEarth";
+
+        private MapCtrl()
         {
             InitializeComponent();
         }
 
+        private IMap _map;
         private IMapGroup _group;
+        private IMapView _initialView;
+        private IResourceService _resSvc;
 
-        public MapCtrl(IMapGroup group) : this() 
+        private Dictionary<string, CmsMap> _cmsMaps;
+
+        class CmsMap : IMap
         {
+            internal IMap WrappedInstance { get { return _map; } }
+
+            public bool IsEnabled { get; set; }
+
+            private IMap _map;
+
+            public CmsMap(IMap map) { _map = map; }
+
+            public string Type
+            {
+                get
+                {
+                    return _map.Type;
+                }
+                set
+                {
+                    _map.Type = value;
+                }
+            }
+
+            public bool SingleTile
+            {
+                get
+                {
+                    return _map.SingleTile;
+                }
+                set
+                {
+                    _map.SingleTile = value;
+                }
+            }
+
+            public event PropertyChangedEventHandler PropertyChanged;
+
+            public IExtension Extension
+            {
+                get { return _map.Extension; }
+            }
+
+
+            public ICmsMapOptions CmsMapOptions
+            {
+                get
+                {
+                    return _map.CmsMapOptions;
+                }
+                set
+                {
+                    _map.CmsMapOptions = value;
+                }
+            }
+
+            public ICmsMapOptions CreateOptions(string name, string type)
+            {
+                return _map.CreateOptions(name, type);
+            }
+
+
+            public IMapGuideOverlayOptions OverlayOptions
+            {
+                get
+                {
+                    return _map.OverlayOptions;
+                }
+                set
+                {
+                    _map.OverlayOptions = value;
+                }
+            }
+
+            public IMapGuideOverlayOptions CreateOverlayOptions(bool isBaseLayer, bool useOverlay, string projection)
+            {
+                return _map.CreateOverlayOptions(isBaseLayer, useOverlay, projection);
+            }
+        }
+
+        private bool _noEvents = true;
+        private IApplicationDefinition _appDef;
+
+        public MapCtrl(IApplicationDefinition appDef, IMapGroup group, IResourceService resSvc) : this() 
+        {
+            _appDef = appDef;
             _group = group;
+
+            foreach (var map in group.Map)
+            {
+                if (map.Type.Equals("MapGuide"))
+                {
+                    _map = map;
+                    break;
+                }
+            }
+
+            _initialView = _group.InitialView;
+            _resSvc = resSvc;
+            _cmsMaps = new Dictionary<string, CmsMap>();
+            chkOverride.Checked = (_initialView != null);
+
+            InitCmsMaps(group);
+            Debug.Assert(_cmsMaps.Count == 9);
+
+            if (_initialView == null)
+                _initialView = group.CreateInitialView(0.0, 0.0, 0.0);
+
+            txtViewX.Text = _initialView.CenterX.ToString(CultureInfo.InvariantCulture);
+            txtViewY.Text = _initialView.CenterY.ToString(CultureInfo.InvariantCulture);
+            txtViewScale.Text = _initialView.Scale.ToString(CultureInfo.InvariantCulture);
+
+            txtViewX.TextChanged += (s, e) =>
+            {
+                double d;
+                if (double.TryParse(txtViewX.Text, out d))
+                    _initialView.CenterX = d;
+            };
+            txtViewY.TextChanged += (s, e) =>
+            {
+                double d;
+                if (double.TryParse(txtViewY.Text, out d))
+                    _initialView.CenterY = d;
+            };
+            txtViewScale.TextChanged += (s, e) =>
+            {
+                double d;
+                if (double.TryParse(txtViewScale.Text, out d))
+                    _initialView.Scale = d;
+            };
+
+            TextBoxBinder.BindText(txtMapId, group, "id");
+
+            txtMapDefinition.Text = _map.GetMapDefinition();
+            txtMapDefinition.TextChanged += (s, e) => { _map.SetMapDefinition(txtMapDefinition.Text); };
+
+            CheckBoxBinder.BindChecked(chkSingleTiled, _map, "SingleTile");
+
+            var selOverlay = _map.GetValue("SelectionAsOverlay");
+            var selColor = _map.GetValue("SelectionColor");
+
+            if (!string.IsNullOrEmpty(selColor))
+                cmbSelectionColor.CurrentColor = Utility.ParseHTMLColor(selColor.Substring(2)); //Strip the "0x" part
+            
+            if (!string.IsNullOrEmpty(selOverlay))
+            {
+                bool b = true;
+                if (bool.TryParse(selOverlay, out b))
+                    chkSelectionAsOverlay.Checked = b;
+            }
+
+            cmbSelectionColor.SelectedIndexChanged += (s, e) => 
+            {
+                _map.SetValue("SelectionColor", "0x" + Utility.SerializeHTMLColor(cmbSelectionColor.CurrentColor, true));
+            };
+            chkSelectionAsOverlay.CheckedChanged += (s, e) => { _map.SetValue("SelectionAsOverlay", chkSelectionAsOverlay.Checked.ToString().ToLower()); };
+            
+            _noEvents = false;
         }
+
+        private void InitCmsMaps(IMapGroup group)
+        {
+            foreach (var map in group.Map)
+            {
+                var opts = map.CmsMapOptions;
+                if (opts != null && _cmsMaps.ContainsKey(opts.Type))
+                {
+                    _cmsMaps[opts.Type] = new CmsMap(map) { IsEnabled = true };
+                }
+            }
+
+            //Check for maps unaccounted for, these will be disabled
+            if (!_cmsMaps.ContainsKey(G_HYBRID_MAP))
+                _cmsMaps[G_HYBRID_MAP] = new CmsMap(group.CreateCmsMapEntry(Type_Google, true, "Google Maps Hybrid", G_HYBRID_MAP)) { IsEnabled = false };
+            if (!_cmsMaps.ContainsKey(G_NORMAL_MAP))
+                _cmsMaps[G_NORMAL_MAP] = new CmsMap(group.CreateCmsMapEntry(Type_Google, true, "Google Maps Street", G_NORMAL_MAP)) { IsEnabled = false };
+            if (!_cmsMaps.ContainsKey(G_SATELLITE_MAP))
+                _cmsMaps[G_SATELLITE_MAP] = new CmsMap(group.CreateCmsMapEntry(Type_Google, true, "Google Maps Satellite", G_SATELLITE_MAP)) { IsEnabled = false };
+            if (!_cmsMaps.ContainsKey(YAHOO_MAP_HYB))
+                _cmsMaps[YAHOO_MAP_HYB] = new CmsMap(group.CreateCmsMapEntry(Type_Yahoo, true, "Yahoo! Maps Hybrid", YAHOO_MAP_HYB)) { IsEnabled = false };
+            if (!_cmsMaps.ContainsKey(YAHOO_MAP_REG))
+                _cmsMaps[YAHOO_MAP_REG] = new CmsMap(group.CreateCmsMapEntry(Type_Yahoo, true, "Yahoo! Maps Street", YAHOO_MAP_REG)) { IsEnabled = false };
+            if (!_cmsMaps.ContainsKey(YAHOO_MAP_SAT))
+                _cmsMaps[YAHOO_MAP_SAT] = new CmsMap(group.CreateCmsMapEntry(Type_Yahoo, true, "Yahoo! Maps Satellite", YAHOO_MAP_SAT)) { IsEnabled = false };
+            if (!_cmsMaps.ContainsKey(BING_ROAD))
+                _cmsMaps[BING_ROAD] = new CmsMap(group.CreateCmsMapEntry(Type_Bing, true, "Bing Maps Street", BING_ROAD)) { IsEnabled = false };
+            if (!_cmsMaps.ContainsKey(BING_AERIAL))
+                _cmsMaps[BING_AERIAL] = new CmsMap(group.CreateCmsMapEntry(Type_Bing, true, "Bing Maps Satellite", BING_AERIAL)) { IsEnabled = false };
+            if (!_cmsMaps.ContainsKey(BING_HYBRID))
+                _cmsMaps[BING_HYBRID] = new CmsMap(group.CreateCmsMapEntry(Type_Bing, true, "Bing Maps Hybrid", BING_HYBRID)) { IsEnabled = false };
+
+        }
+
+        private void chkOverride_CheckedChanged(object sender, EventArgs e)
+        {
+            if (_noEvents)
+                return;
+
+            if (chkOverride.Checked)
+                _group.InitialView = _initialView;
+            else
+                _group.InitialView = null;
+        }
+
+        private void btnBrowseMdf_Click(object sender, EventArgs e)
+        {
+            using (var picker = new ResourcePicker(_resSvc, ResourceTypes.MapDefinition, ResourcePickerMode.OpenResource))
+            {
+                if (picker.ShowDialog() == DialogResult.OK)
+                {
+                    txtMapDefinition.Text = picker.ResourceID;
+                }
+            }
+        }
+
+        private void SetCmsAvailability(string olType, bool enabled)
+        {
+            Trace.TraceInformation("Setting availability of CMS provider ({0}) to {1}", olType, enabled);
+            if (_cmsMaps.ContainsKey(olType))
+            {
+                var map = _cmsMaps[olType];
+                if (map.IsEnabled != enabled)
+                {
+                    map.IsEnabled = enabled;
+                    if (enabled) //add
+                    {
+                        _group.AddMap(_cmsMaps[olType].WrappedInstance);
+                    }
+                    else //remove
+                    {
+                        IMap remove = null;
+                        foreach (IMap m in _group.Map)
+                        {
+                            var opt = m.CmsMapOptions;
+                            if (opt != null && opt.Type == olType)
+                            {
+                                remove = m;
+                                break;
+                            }
+                        }
+
+                        if (remove != null)
+                            _group.RemoveMap(remove);
+                    }
+                }
+            }
+
+            if (IsUsingCmsLayers())
+                _map.OverlayOptions = _map.CreateOverlayOptions(false, true, "EPSG:900913");
+            else
+                _map.OverlayOptions = null;
+        }
+
+        private bool IsUsingCmsLayers()
+        {
+            foreach (var map in _cmsMaps.Values)
+            {
+                if (map.IsEnabled)
+                    return true;
+            }
+
+            return false;
+        }
+
+        private void chkBingStreets_CheckedChanged(object sender, EventArgs e)
+        {
+            if (chkBingStreets.Checked)
+                _appDef.SetValue("VirtualEarthScript", BING_URL);
+            SetCmsAvailability(BING_ROAD, chkBingStreets.Checked);
+        }
+
+        private void chkBingSatellite_CheckedChanged(object sender, EventArgs e)
+        {
+            if (chkBingSatellite.Checked)
+                _appDef.SetValue("VirtualEarthScript", BING_URL);
+            SetCmsAvailability(BING_AERIAL, chkBingSatellite.Checked);
+        }
+
+        private void chkBingHybrid_CheckedChanged(object sender, EventArgs e)
+        {
+            if (chkBingHybrid.Checked)
+                _appDef.SetValue("VirtualEarthScript", BING_URL);
+            SetCmsAvailability(BING_HYBRID, chkBingHybrid.Checked);
+        }
+
+        private void chkGoogStreets_CheckedChanged(object sender, EventArgs e)
+        {
+            SetCmsAvailability(G_NORMAL_MAP, chkGoogStreets.Checked);
+            EvaluateCmsStates();
+        }
+
+        private void chkGoogSatellite_CheckedChanged(object sender, EventArgs e)
+        {
+            SetCmsAvailability(G_SATELLITE_MAP, chkGoogSatellite.Checked);
+            EvaluateCmsStates();
+        }
+
+        private void chkGoogHybrid_CheckedChanged(object sender, EventArgs e)
+        {
+            SetCmsAvailability(G_HYBRID_MAP, chkGoogHybrid.Checked);
+            EvaluateCmsStates();
+        }
+
+        private void chkYahooStreets_CheckedChanged(object sender, EventArgs e)
+        {
+            SetCmsAvailability(YAHOO_MAP_REG, chkYahooStreets.Checked);
+            EvaluateCmsStates();
+        }
+
+        private void chkYahooSatellite_CheckedChanged(object sender, EventArgs e)
+        {
+            SetCmsAvailability(YAHOO_MAP_SAT, chkYahooSatellite.Checked);
+            EvaluateCmsStates();
+        }
+
+        private void chkYahooHybrid_CheckedChanged(object sender, EventArgs e)
+        {
+            SetCmsAvailability(YAHOO_MAP_HYB, chkYahooHybrid.Checked);
+            EvaluateCmsStates();
+        }
+
+        private void EvaluateCmsStates()
+        {
+            txtGoogApiKey.Enabled = IsGoogleMapsEnabled();
+            txtYahooApiKey.Enabled = IsYahooMapsEnabled();
+        }
+
+        private bool IsGoogleMapsEnabled()
+        {
+            return chkGoogHybrid.Checked ||
+                   chkGoogSatellite.Checked ||
+                   chkGoogStreets.Checked;
+        }
+
+        private bool IsYahooMapsEnabled()
+        {
+            return chkYahooHybrid.Checked ||
+                   chkYahooSatellite.Checked ||
+                   chkYahooStreets.Checked;
+        }
+
+        private void txtGoogApiKey_TextChanged(object sender, EventArgs e)
+        {
+            _appDef.SetValue("GoogleScript", GOOGLE_URL + txtGoogApiKey.Text);
+        }
+
+        private void txtYahooApiKey_TextChanged(object sender, EventArgs e)
+        {
+            _appDef.SetValue("YahooScript", YAHOO_URL + txtGoogApiKey.Text);
+        }
+
+        const string GOOGLE_URL = "http://maps.google.com/maps?file=api&amp;v=2&amp;key=";
+        const string YAHOO_URL = "http://api.maps.yahoo.com/ajaxymap?v=3.0&amp;appid=";
+        const string BING_URL = "http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2";
     }
 }

Modified: sandbox/maestro-3.0/Maestro.Editors/Fusion/MapSettingsCtrl.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/Fusion/MapSettingsCtrl.cs	2010-12-02 20:00:05 UTC (rev 5432)
+++ sandbox/maestro-3.0/Maestro.Editors/Fusion/MapSettingsCtrl.cs	2010-12-03 12:34:10 UTC (rev 5433)
@@ -106,7 +106,7 @@
             if (grp != null)
             {
                 propertiesPanel.Controls.Clear();
-                var mapCtrl = new MapCtrl(grp);
+                var mapCtrl = new MapCtrl(_flexLayout, grp, _edsvc.ResourceService);
                 mapCtrl.Dock = DockStyle.Fill;
                 propertiesPanel.Controls.Add(mapCtrl);
             }

Modified: sandbox/maestro-3.0/Maestro.Editors/Fusion/MapSettingsCtrl.resx
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/Fusion/MapSettingsCtrl.resx	2010-12-02 20:00:05 UTC (rev 5432)
+++ sandbox/maestro-3.0/Maestro.Editors/Fusion/MapSettingsCtrl.resx	2010-12-03 12:34:10 UTC (rev 5433)
@@ -130,7 +130,7 @@
     <value>209, 6</value>
   </data>
   <data name="propertiesPanel.Size" type="System.Drawing.Size, System.Drawing">
-    <value>426, 251</value>
+    <value>426, 326</value>
   </data>
   <data name="propertiesPanel.TabIndex" type="System.Int32, mscorlib">
     <value>1</value>
@@ -157,7 +157,7 @@
     <value>3, 41</value>
   </data>
   <data name="lstMaps.Size" type="System.Drawing.Size, System.Drawing">
-    <value>194, 210</value>
+    <value>194, 285</value>
   </data>
   <metadata name="mapImgList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>108, 16</value>
@@ -167,7 +167,7 @@
         AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
         LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
         ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABk
-        CAAAAk1TRnQBSQFMAwEBAAEQAQABEAEAARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA
+        CAAAAk1TRnQBSQFMAwEBAAEYAQABGAEAARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA
         AUADAAEQAwABAQEAAQgGAAEEGAABgAIAAYADAAKAAQABgAMAAYABAAGAAQACgAIAA8ABAAHAAdwBwAEA
         AfABygGmAQABMwUAATMBAAEzAQABMwEAAjMCAAMWAQADHAEAAyIBAAMpAQADVQEAA00BAANCAQADOQEA
         AYABfAH/AQACUAH/AQABkwEAAdYBAAH/AewBzAEAAcYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFm
@@ -272,7 +272,7 @@
     <value>3, 6</value>
   </data>
   <data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
-    <value>200, 254</value>
+    <value>200, 329</value>
   </data>
   <data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
     <value>0</value>
@@ -293,7 +293,7 @@
     <value>1</value>
   </data>
   <data name="contentPanel.Size" type="System.Drawing.Size, System.Drawing">
-    <value>638, 263</value>
+    <value>638, 338</value>
   </data>
   <data name="&gt;&gt;contentPanel.Name" xml:space="preserve">
     <value>contentPanel</value>
@@ -314,7 +314,7 @@
     <value>6, 13</value>
   </data>
   <data name="$this.Size" type="System.Drawing.Size, System.Drawing">
-    <value>638, 290</value>
+    <value>638, 365</value>
   </data>
   <data name="&gt;&gt;mapImgList.Name" xml:space="preserve">
     <value>mapImgList</value>

Modified: sandbox/maestro-3.0/Maestro.Editors/Maestro.Editors.csproj
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/Maestro.Editors.csproj	2010-12-02 20:00:05 UTC (rev 5432)
+++ sandbox/maestro-3.0/Maestro.Editors/Maestro.Editors.csproj	2010-12-03 12:34:10 UTC (rev 5433)
@@ -256,6 +256,12 @@
     <Compile Include="FeatureSource\Providers\Shp\ShpFileCtrl.Designer.cs">
       <DependentUpon>ShpFileCtrl.cs</DependentUpon>
     </Compile>
+    <Compile Include="FeatureSource\Providers\SQLite\SQLiteFileCtrl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="FeatureSource\Providers\SQLite\SQLiteFileCtrl.Designer.cs">
+      <DependentUpon>SQLiteFileCtrl.cs</DependentUpon>
+    </Compile>
     <Compile Include="Fusion\FlexibleLayoutEditor.cs">
       <SubType>UserControl</SubType>
     </Compile>
@@ -915,6 +921,9 @@
       <DependentUpon>ShpFileCtrl.cs</DependentUpon>
       <SubType>Designer</SubType>
     </EmbeddedResource>
+    <EmbeddedResource Include="FeatureSource\Providers\SQLite\SQLiteFileCtrl.resx">
+      <DependentUpon>SQLiteFileCtrl.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="Fusion\FlexibleLayoutEditor.resx">
       <DependentUpon>FlexibleLayoutEditor.cs</DependentUpon>
     </EmbeddedResource>

Modified: sandbox/maestro-3.0/Maestro.Editors/MapDefinition/MapSettingsSectionCtrl.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/MapDefinition/MapSettingsSectionCtrl.cs	2010-12-02 20:00:05 UTC (rev 5432)
+++ sandbox/maestro-3.0/Maestro.Editors/MapDefinition/MapSettingsSectionCtrl.cs	2010-12-03 12:34:10 UTC (rev 5433)
@@ -30,6 +30,7 @@
 using OSGeo.MapGuide.ObjectModels.LayerDefinition;
 using OSGeo.MapGuide.MaestroAPI;
 using OSGeo.MapGuide.ObjectModels.MapDefinition;
+using System.Globalization;
 
 namespace Maestro.Editors.MapDefinition
 {
@@ -89,11 +90,51 @@
                 }
             };
 
-            TextBoxBinder.BindText(txtLowerX, _map.Extents, "MinX");
-            TextBoxBinder.BindText(txtLowerY, _map.Extents, "MinY");
-            TextBoxBinder.BindText(txtUpperX, _map.Extents, "MaxX");
-            TextBoxBinder.BindText(txtUpperY, _map.Extents, "MaxY");
+            txtLowerX.Text = _map.Extents.MinX.ToString(CultureInfo.InvariantCulture);
+            txtLowerY.Text = _map.Extents.MinY.ToString(CultureInfo.InvariantCulture);
+            txtUpperX.Text = _map.Extents.MaxX.ToString(CultureInfo.InvariantCulture);
+            txtUpperY.Text = _map.Extents.MaxY.ToString(CultureInfo.InvariantCulture);
 
+            txtLowerX.TextChanged += (s, e) =>
+            {
+                if (txtLowerX.Text.EndsWith(".")) //Maybe typing in decimals atm
+                    return;
+
+                double d;
+                if (double.TryParse(txtLowerX.Text, out d))
+                    _map.Extents.MinX = d;
+            };
+
+            txtLowerY.TextChanged += (s, e) =>
+            {
+                if (txtLowerY.Text.EndsWith(".")) //Maybe typing in decimals atm
+                    return;
+
+                double d;
+                if (double.TryParse(txtLowerY.Text, out d))
+                    _map.Extents.MinY = d;
+            };
+
+            txtUpperX.TextChanged += (s, e) =>
+            {
+                if (txtUpperX.Text.EndsWith(".")) //Maybe typing in decimals atm
+                    return;
+
+                double d;
+                if (double.TryParse(txtUpperX.Text, out d))
+                    _map.Extents.MaxX = d;
+            };
+
+            txtUpperY.TextChanged += (s, e) =>
+            {
+                if (txtUpperY.Text.EndsWith(".")) //Maybe typing in decimals atm
+                    return;
+
+                double d;
+                if (double.TryParse(txtUpperY.Text, out d))
+                    _map.Extents.MaxY = d;
+            };
+
             _map.Extents.PropertyChanged += (sender, e) => { OnResourceChanged(); };
         }
 

Modified: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/ApplicationDefinition.cs
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/ApplicationDefinition.cs	2010-12-02 20:00:05 UTC (rev 5432)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/ApplicationDefinition.cs	2010-12-03 12:34:10 UTC (rev 5433)
@@ -48,7 +48,10 @@
 
     partial class ApplicationDefinitionType : IApplicationDefinition, IMapSet
     {
-        internal ApplicationDefinitionType() { }
+        internal ApplicationDefinitionType() 
+        {
+            this.Extension = new CustomContentType() { Any = new XmlElement[0] };
+        }
 
         private static readonly Version RES_VERSION = new Version(1, 0, 0);
 
@@ -680,6 +683,33 @@
 
     partial class MapGroupType : IMapGroup
     {
+        IMap IMapGroup.CreateCmsMapEntry(string type, bool singleTile, string name, string olType)
+        {
+            var el = AppDefDocument.Instance.CreateElement("Options");
+            var n = AppDefDocument.Instance.CreateElement("name");
+            var t = AppDefDocument.Instance.CreateElement("type");
+
+            n.InnerText = name;
+            t.InnerText = olType;
+            el.AppendChild(n);
+            el.AppendChild(t);
+
+            return new MapType()
+            {
+                Extension = new CustomContentType()
+                {
+                    Any = new XmlElement[] { el }
+                },
+                SingleTile = "true",
+                Type = type
+            };
+        }
+
+        IMapView IMapGroup.CreateInitialView(double x, double y, double scale)
+        {
+            return new MapViewType() { CenterX = x, CenterY = y, Scale = scale };
+        }
+
         int IMapGroup.MapCount
         {
             get
@@ -745,6 +775,28 @@
         }
     }
 
+    public class MapGuideOverlayOptions : IMapGuideOverlayOptions
+    {
+
+        public bool IsBaseLayer
+        {
+            get;
+            set;
+        }
+
+        public bool UseOverlay
+        {
+            get;
+            set;
+        }
+
+        public string Projection
+        {
+            get;
+            set;
+        }
+    }
+
     partial class MapType : IMap
     {
         IExtension IExtensibleElement.Extension
@@ -770,5 +822,233 @@
                 this.SingleTile = value.ToString();
             }
         }
+
+        public ICmsMapOptions CreateOptions(string name, string type)
+        {
+            return new MapOptions() { Name = name, Type = type };
+        }
+
+        [XmlIgnore]
+        public ICmsMapOptions CmsMapOptions
+        {
+            get
+            {
+                if (this.extensionField.Any.Length > 0)
+                {
+                     var els = new List<XmlElement>(this.extensionField.Any);
+                     for (int i = 0; i < els.Count; i++)
+                     {
+                         if (els[i].Name.Equals("Options"))
+                         {
+                             try
+                             {
+                                 var n = els[i]["name"];
+                                 var t = els[i]["type"];
+
+                                 if (n != null && t != null)
+                                     return new MapOptions() { Name = n.InnerText, Type = t.InnerText };
+                             }
+                             catch
+                             {
+                                 return null;
+                             }
+                         }
+                     }
+                     return null;
+                }
+                else
+                {
+                    return null;
+                }
+            }
+            set
+            {
+                if (this.Type.Equals("MapGuide"))
+                    throw new InvalidOperationException("CMS options are only available for non-MapGuide maps");
+
+                if (value == null)
+                {
+                    if (this.extensionField.Any.Length > 0)
+                    {
+                        var els = new List<XmlElement>(this.extensionField.Any);
+                        for (int i = 0; i < els.Count; i++)
+                        {
+                            if (els[i].Name.Equals("Options"))
+                            {
+                                els.RemoveAt(i);
+                                break;
+                            }
+                        }
+                    }
+                }
+                else
+                {
+                    XmlElement el = null;
+                    if (this.Extension.Any.Length == 0)
+                    {
+                        el = AppDefDocument.Instance.CreateElement("Options");
+
+                        var n = AppDefDocument.Instance.CreateElement("name");
+                        var t = AppDefDocument.Instance.CreateElement("type");
+
+                        n.InnerText = value.Name;
+                        t.InnerText = value.Type;
+
+                        el.AppendChild(n);
+                        el.AppendChild(t);
+
+                        this.Extension.Any = new XmlElement[] { el };
+                    }
+                    else
+                    {
+                        var els = new List<XmlElement>(this.extensionField.Any);
+                        for (int i = 0; i < els.Count; i++)
+                        {
+                            if (els[i].Name.Equals("Options"))
+                            {
+                                els[i].RemoveAll();
+
+                                var n = AppDefDocument.Instance.CreateElement("name");
+                                var t = AppDefDocument.Instance.CreateElement("type");
+
+                                n.InnerText = value.Name;
+                                t.InnerText = value.Type;
+
+                                els[i].AppendChild(n);
+                                els[i].AppendChild(t);
+                                break;
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
+        [XmlIgnore]
+        public IMapGuideOverlayOptions OverlayOptions
+        {
+            /*
+            From Fusion Wiki:
+            
+            Note that the commercial layer must be the base layer so any overlays must 
+            have the isBaseLayer: false option set. The projection tag is needed so 
+            that OpenLayers will initialize the layer in the same projection as the base 
+            map.
+            
+            <Options>
+               <isBaseLayer>false</isBaseLayer>
+               <useOverlay>true</useOverlay>
+               <projection>EPSG:900913</projection>
+            </Options>
+             */
+            get
+            {
+                if (this.extensionField.Any.Length > 0)
+                {
+                    var els = new List<XmlElement>(this.extensionField.Any);
+                    for (int i = 0; i < els.Count; i++)
+                    {
+                        if (els[i].Name.Equals("Options"))
+                        {
+                            try
+                            {
+                                var n = els[i]["isBaseLayer"];
+                                var t = els[i]["useOverlay"];
+                                var p = els[i]["projection"];
+
+                                if (n != null && t != null)
+                                    return CreateOverlayOptions(Convert.ToBoolean(n.InnerText), Convert.ToBoolean(t.InnerText), p.InnerText);
+                            }
+                            catch
+                            {
+                                return null;
+                            }
+                        }
+                    }
+                    return null;
+                }
+                else
+                {
+                    return null;
+                }
+            }
+            set
+            {
+                if (!this.Type.Equals("MapGuide"))
+                    throw new InvalidOperationException("Overlay options are only applicable to MapGuide maps");
+
+                if (value == null)
+                {
+                    if (this.extensionField.Any.Length > 0)
+                    {
+                        var els = new List<XmlElement>(this.extensionField.Any);
+                        for (int i = 0; i < els.Count; i++)
+                        {
+                            if (els[i].Name.Equals("Options"))
+                            {
+                                els.RemoveAt(i);
+                                this.extensionField.Any = els.ToArray();
+                                break;
+                            }
+                        }
+                    }
+                }
+                else
+                {
+                    XmlElement el = null;
+                    if (this.Extension.Any.Length == 0)
+                    {
+                        el = AppDefDocument.Instance.CreateElement("Options");
+
+                        this.Extension.Any = new XmlElement[] { el };
+                    }
+                    else
+                    {
+                        var els = new List<XmlElement>(this.extensionField.Any);
+                        for (int i = 0; i < els.Count; i++)
+                        {
+                            if (els[i].Name.Equals("Options"))
+                            {
+                                el = els[i];
+                                break;
+                            }
+                        }
+
+                        if (el == null)
+                        {
+                            el = AppDefDocument.Instance.CreateElement("Options");
+                            els.Add(el);
+                            this.Extension.Any = els.ToArray();
+                        }
+                    }
+
+                    el.RemoveAll();
+
+                    var n = AppDefDocument.Instance.CreateElement("isBaseLayer");
+                    var t = AppDefDocument.Instance.CreateElement("useOverlay");
+                    var p = AppDefDocument.Instance.CreateElement("projection");
+
+                    n.InnerText = value.IsBaseLayer.ToString().ToLower();
+                    t.InnerText = value.UseOverlay.ToString().ToLower();
+                    p.InnerText = value.Projection;
+
+                    el.AppendChild(n);
+                    el.AppendChild(t);
+                    el.AppendChild(p);
+                }
+            }
+        }
+
+        public IMapGuideOverlayOptions CreateOverlayOptions(bool isBaseLayer, bool useOverlay, string projection)
+        {
+            return new MapGuideOverlayOptions() { IsBaseLayer = isBaseLayer, UseOverlay = useOverlay, Projection = projection };
+        }
     }
+
+    public class MapOptions : ICmsMapOptions
+    {
+        public string Name { get; set; }
+
+        public string Type { get; set; }
+    }
 }

Modified: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/ApplicationDefinitionInterfaces.cs
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/ApplicationDefinitionInterfaces.cs	2010-12-02 20:00:05 UTC (rev 5432)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/ApplicationDefinitionInterfaces.cs	2010-12-03 12:34:10 UTC (rev 5433)
@@ -25,6 +25,7 @@
 using OSGeo.MapGuide.MaestroAPI.Resource;
 using OSGeo.MapGuide.MaestroAPI;
 using System.Collections.Specialized;
+using System.Diagnostics;
 
 namespace OSGeo.MapGuide.ObjectModels.ApplicationDefinition
 {
@@ -562,19 +563,30 @@
             Check.NotNull(ext, "ext");
             Check.NotEmpty(name, "name");
 
-            var el = ext.Extension.Content.FindElementByName(name);
-            if (el != null)
+            if (ext.Extension.Content != null)
             {
-                el.InnerText = value;
+                var el = ext.Extension.Content.FindElementByName(name);
+                if (el != null)
+                {
+                    el.InnerText = value;
+                }
+                else
+                {
+                    var values = new List<XmlElement>(ext.Extension.Content);
+                    var rid = AppDefDocument.Instance.CreateElement(name);
+                    rid.InnerText = value;
+                    values.Add(rid);
+                    ext.Extension.Content = values.ToArray();
+                }
             }
             else
             {
-                var values = new List<XmlElement>(ext.Extension.Content);
                 var rid = AppDefDocument.Instance.CreateElement(name);
                 rid.InnerText = value;
-                values.Add(rid);
-                ext.Extension.Content = values.ToArray();
+                ext.Extension.Content = new XmlElement[] { rid };
             }
+
+            Trace.TraceInformation("Extensible element property {0} set to: {1}", name, value);
         }
 
         /// <summary>
@@ -830,6 +842,10 @@
         int MapCount { get; }
 
         IMap GetMapAt(int index);
+
+        IMapView CreateInitialView(double x, double y, double scale);
+
+        IMap CreateCmsMapEntry(string type, bool singleTile, string name, string olType);
     }
 
     public interface IMap : INotifyPropertyChanged, IExtensibleElement
@@ -837,8 +853,32 @@
         string Type { get; set; }
 
         bool SingleTile { get; set; }
+
+        IMapGuideOverlayOptions OverlayOptions { get; set; }
+
+        IMapGuideOverlayOptions CreateOverlayOptions(bool isBaseLayer, bool useOverlay, string projection);
+
+        ICmsMapOptions CmsMapOptions { get; set; }
+
+        ICmsMapOptions CreateOptions(string name, string type);
     }
 
+    public interface IMapGuideOverlayOptions
+    {
+        bool IsBaseLayer { get; set; }
+
+        bool UseOverlay { get; set; }
+
+        string Projection { get; set; }
+    }
+
+    public interface ICmsMapOptions
+    {
+        string Name { get; set; }
+
+        string Type { get; set; }
+    }
+
     /// <summary>
     /// Represents a flexible layout's widget set. This is analogous to a Command Set in a Web Layout
     /// </summary>

Modified: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Resource/IResource.cs
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Resource/IResource.cs	2010-12-02 20:00:05 UTC (rev 5432)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Resource/IResource.cs	2010-12-03 12:34:10 UTC (rev 5433)
@@ -110,7 +110,12 @@
             foreach (var res in source.EnumerateResourceData())
             {
                 var data = source.GetResourceData(res.Name);
-                data.Position = 0L; //Reset
+                if (!data.CanSeek)
+                {
+                    var ms = new MemoryStream();
+                    Utility.CopyStream(data, ms);
+                    data = ms;
+                }
                 target.SetResourceData(res.Name, res.Type, data);
             }
         }
@@ -128,7 +133,12 @@
             foreach (var res in source.EnumerateResourceData())
             {
                 var data = source.GetResourceData(res.Name);
-                data.Position = 0L; //Reset
+                if (!data.CanSeek)
+                {
+                    var ms = new MemoryStream();
+                    Utility.CopyStream(data, ms);
+                    data = ms;
+                }
                 source.CurrentConnection.ResourceService.SetResourceData(targetID, res.Name, res.Type, data);
             }
         }



More information about the mapguide-commits mailing list