[mapguide-commits] r5971 - in trunk/Tools/Maestro: Maestro
Maestro.Editors/Fusion
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Tue Jul 5 13:21:29 EDT 2011
Author: jng
Date: 2011-07-05 10:21:29 -0700 (Tue, 05 Jul 2011)
New Revision: 5971
Modified:
trunk/Tools/Maestro/Maestro.Editors/Fusion/MapCtrl.Designer.cs
trunk/Tools/Maestro/Maestro.Editors/Fusion/MapCtrl.cs
trunk/Tools/Maestro/Maestro.Editors/Fusion/MapCtrl.resx
trunk/Tools/Maestro/Maestro/changelog.txt
Log:
#1735: Update fusion editor to use Google Maps V3 URL. This currently breaks the BasemapSwitcher widget as it still uses V2 map names.
Modified: trunk/Tools/Maestro/Maestro/changelog.txt
===================================================================
--- trunk/Tools/Maestro/Maestro/changelog.txt 2011-07-05 16:41:50 UTC (rev 5970)
+++ trunk/Tools/Maestro/Maestro/changelog.txt 2011-07-05 17:21:29 UTC (rev 5971)
@@ -1,7 +1,9 @@
3.5 beta 1
----------
+
- Watermark Definition editor
- Symbol Definition editor (simple and compound). Currently supports the 1.0.0 schema feature set.
+ - Updated Fusion editor to use Google Maps V3
- Maestro.Editors library is now fully self-contained, not requiring the WebStudio directory for pattern images.
- Preview Web Layouts now include a new command to report current map extents.
- Exceptions are now displayed in a more flexible error dialog.
Modified: trunk/Tools/Maestro/Maestro.Editors/Fusion/MapCtrl.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Fusion/MapCtrl.Designer.cs 2011-07-05 16:41:50 UTC (rev 5970)
+++ trunk/Tools/Maestro/Maestro.Editors/Fusion/MapCtrl.Designer.cs 2011-07-05 17:21:29 UTC (rev 5971)
@@ -49,6 +49,7 @@
this.cmbSelectionColor = new Maestro.Editors.Common.ColorComboBox();
this.grpCms = new System.Windows.Forms.GroupBox();
this.groupBox5 = new System.Windows.Forms.GroupBox();
+ this.chkGoogTerrain = new System.Windows.Forms.CheckBox();
this.chkGoogStreets = new System.Windows.Forms.CheckBox();
this.chkGoogSatellite = new System.Windows.Forms.CheckBox();
this.chkGoogHybrid = new System.Windows.Forms.CheckBox();
@@ -61,9 +62,7 @@
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();
@@ -196,14 +195,13 @@
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.Name = "grpCms";
this.grpCms.TabStop = false;
//
// groupBox5
//
+ this.groupBox5.Controls.Add(this.chkGoogTerrain);
this.groupBox5.Controls.Add(this.chkGoogStreets);
this.groupBox5.Controls.Add(this.chkGoogSatellite);
this.groupBox5.Controls.Add(this.chkGoogHybrid);
@@ -211,6 +209,13 @@
this.groupBox5.Name = "groupBox5";
this.groupBox5.TabStop = false;
//
+ // chkGoogTerrain
+ //
+ resources.ApplyResources(this.chkGoogTerrain, "chkGoogTerrain");
+ this.chkGoogTerrain.Name = "chkGoogTerrain";
+ this.chkGoogTerrain.UseVisualStyleBackColor = true;
+ this.chkGoogTerrain.CheckedChanged += new System.EventHandler(this.chkGoogTerrain_CheckedChanged);
+ //
// chkGoogStreets
//
resources.ApplyResources(this.chkGoogStreets, "chkGoogStreets");
@@ -298,29 +303,18 @@
this.txtYahooApiKey.Name = "txtYahooApiKey";
this.txtYahooApiKey.TextChanged += new System.EventHandler(this.txtYahooApiKey_TextChanged);
//
- // txtGoogApiKey
- //
- resources.ApplyResources(this.txtGoogApiKey, "txtGoogApiKey");
- this.txtGoogApiKey.Name = "txtGoogApiKey";
- this.txtGoogApiKey.TextChanged += new System.EventHandler(this.txtGoogApiKey_TextChanged);
- //
// label7
//
resources.ApplyResources(this.label7, "label7");
this.label7.Name = "label7";
//
- // label6
- //
- resources.ApplyResources(this.label6, "label6");
- this.label6.Name = "label6";
- //
// MapCtrl
//
- resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.Controls.Add(this.grpCms);
this.Controls.Add(this.groupBox2);
this.Name = "MapCtrl";
+ resources.ApplyResources(this, "$this");
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
@@ -367,12 +361,11 @@
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;
+ private System.Windows.Forms.CheckBox chkGoogTerrain;
}
}
Modified: trunk/Tools/Maestro/Maestro.Editors/Fusion/MapCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Fusion/MapCtrl.cs 2011-07-05 16:41:50 UTC (rev 5970)
+++ trunk/Tools/Maestro/Maestro.Editors/Fusion/MapCtrl.cs 2011-07-05 17:21:29 UTC (rev 5971)
@@ -38,9 +38,10 @@
[ToolboxItem(false)]
internal partial class MapCtrl : UserControl, INotifyResourceChanged
{
- 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 G_NORMAL_MAP = "ROADMAP";
+ const string G_SATELLITE_MAP = "SATELLITE";
+ const string G_HYBRID_MAP = "HYBRID";
+ const string G_PHYSICAL_MAP = "TERRAIN";
const string YAHOO_MAP_REG = "YAHOO_MAP_REG";
const string YAHOO_MAP_SAT = "YAHOO_MAP_SAT";
@@ -178,6 +179,9 @@
case G_SATELLITE_MAP:
chkGoogSatellite.Checked = true;
break;
+ case G_PHYSICAL_MAP:
+ chkGoogTerrain.Checked = true;
+ break;
case BING_AERIAL:
chkBingSatellite.Checked = true;
break;
@@ -204,10 +208,6 @@
string googUrl = _appDef.GetValue("GoogleScript");
string yahooUrl = _appDef.GetValue("YahooScript");
- if (!string.IsNullOrEmpty(googUrl))
- {
- txtGoogApiKey.Text = googUrl.Substring(GOOGLE_URL.Length);
- }
if (!string.IsNullOrEmpty(yahooUrl))
{
txtYahooApiKey.Text = yahooUrl.Substring(YAHOO_URL.Length);
@@ -219,7 +219,7 @@
chkOverride.Checked = (_initialView != null);
InitCmsMaps(group);
- Debug.Assert(_cmsMaps.Count == 9);
+ Debug.Assert(_cmsMaps.Count == 10);
if (_initialView == null)
_initialView = group.CreateInitialView(0.0, 0.0, 0.0);
@@ -320,11 +320,13 @@
//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 };
+ _cmsMaps[G_HYBRID_MAP] = new CmsMap(group.CreateCmsMapEntry(Type_Google, true, "Google 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 };
+ _cmsMaps[G_NORMAL_MAP] = new CmsMap(group.CreateCmsMapEntry(Type_Google, true, "Google Streets", 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 };
+ _cmsMaps[G_SATELLITE_MAP] = new CmsMap(group.CreateCmsMapEntry(Type_Google, true, "Google Satellite", G_SATELLITE_MAP)) { IsEnabled = false };
+ if (!_cmsMaps.ContainsKey(G_PHYSICAL_MAP))
+ _cmsMaps[G_PHYSICAL_MAP] = new CmsMap(group.CreateCmsMapEntry(Type_Google, true, "Google Physical", G_PHYSICAL_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))
@@ -451,8 +453,9 @@
if (_noEvents)
return;
+ if (chkGoogStreets.Checked)
+ _appDef.SetValue("GoogleScript", GOOGLE_URL);
SetCmsAvailability(G_NORMAL_MAP, chkGoogStreets.Checked);
- EvaluateCmsStates();
}
private void chkGoogSatellite_CheckedChanged(object sender, EventArgs e)
@@ -460,8 +463,9 @@
if (_noEvents)
return;
+ if (chkGoogSatellite.Checked)
+ _appDef.SetValue("GoogleScript", GOOGLE_URL);
SetCmsAvailability(G_SATELLITE_MAP, chkGoogSatellite.Checked);
- EvaluateCmsStates();
}
private void chkGoogHybrid_CheckedChanged(object sender, EventArgs e)
@@ -469,10 +473,21 @@
if (_noEvents)
return;
+ if (chkGoogHybrid.Checked)
+ _appDef.SetValue("GoogleScript", GOOGLE_URL);
SetCmsAvailability(G_HYBRID_MAP, chkGoogHybrid.Checked);
- EvaluateCmsStates();
}
+ private void chkGoogTerrain_CheckedChanged(object sender, EventArgs e)
+ {
+ if (_noEvents)
+ return;
+
+ if (chkGoogTerrain.Checked)
+ _appDef.SetValue("GoogleScript", GOOGLE_URL);
+ SetCmsAvailability(G_PHYSICAL_MAP, chkGoogTerrain.Checked);
+ }
+
private void chkYahooStreets_CheckedChanged(object sender, EventArgs e)
{
if (_noEvents)
@@ -502,7 +517,6 @@
private void EvaluateCmsStates()
{
- txtGoogApiKey.Enabled = IsGoogleMapsEnabled();
txtYahooApiKey.Enabled = IsYahooMapsEnabled();
}
@@ -510,7 +524,8 @@
{
return chkGoogHybrid.Checked ||
chkGoogSatellite.Checked ||
- chkGoogStreets.Checked;
+ chkGoogStreets.Checked ||
+ chkGoogTerrain.Checked;
}
private bool IsYahooMapsEnabled()
@@ -520,14 +535,6 @@
chkYahooStreets.Checked;
}
- private void txtGoogApiKey_TextChanged(object sender, EventArgs e)
- {
- if (_noEvents)
- return;
-
- _appDef.SetValue("GoogleScript", GOOGLE_URL + txtGoogApiKey.Text);
- }
-
private void txtYahooApiKey_TextChanged(object sender, EventArgs e)
{
if (_noEvents)
@@ -536,7 +543,7 @@
_appDef.SetValue("YahooScript", YAHOO_URL + txtYahooApiKey.Text);
}
- const string GOOGLE_URL = "http://maps.google.com/maps?file=api&v=2&key=";
+ const string GOOGLE_URL = "http://maps.google.com/maps/api/js?sensor=false";
const string YAHOO_URL = "http://api.maps.yahoo.com/ajaxymap?v=3.0&appid=";
const string BING_URL = "http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2";
Modified: trunk/Tools/Maestro/Maestro.Editors/Fusion/MapCtrl.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Fusion/MapCtrl.resx 2011-07-05 16:41:50 UTC (rev 5970)
+++ trunk/Tools/Maestro/Maestro.Editors/Fusion/MapCtrl.resx 2011-07-05 17:21:29 UTC (rev 5971)
@@ -538,7 +538,7 @@
<value>cmbSelectionColor</value>
</data>
<data name=">>cmbSelectionColor.Type" xml:space="preserve">
- <value>Maestro.Editors.Common.ColorComboBox, Maestro.Editors, Version=3.0.0.5334, Culture=neutral, PublicKeyToken=null</value>
+ <value>Maestro.Editors.Common.ColorComboBox, Maestro.Editors, Version=3.1.0.5859, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name=">>cmbSelectionColor.Parent" xml:space="preserve">
<value>groupBox2</value>
@@ -571,8 +571,38 @@
<value>1</value>
</data>
<data name="grpCms.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
- <value>Top, Left, Right</value>
+ <value>Top, Bottom, Left, Right</value>
</data>
+ <data name="chkGoogTerrain.AutoSize" type="System.Boolean, mscorlib">
+ <value>True</value>
+ </data>
+ <data name="chkGoogTerrain.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+ <value>NoControl</value>
+ </data>
+ <data name="chkGoogTerrain.Location" type="System.Drawing.Point, System.Drawing">
+ <value>11, 89</value>
+ </data>
+ <data name="chkGoogTerrain.Size" type="System.Drawing.Size, System.Drawing">
+ <value>59, 17</value>
+ </data>
+ <data name="chkGoogTerrain.TabIndex" type="System.Int32, mscorlib">
+ <value>9</value>
+ </data>
+ <data name="chkGoogTerrain.Text" xml:space="preserve">
+ <value>Terrain</value>
+ </data>
+ <data name=">>chkGoogTerrain.Name" xml:space="preserve">
+ <value>chkGoogTerrain</value>
+ </data>
+ <data name=">>chkGoogTerrain.Type" xml:space="preserve">
+ <value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+ <data name=">>chkGoogTerrain.Parent" xml:space="preserve">
+ <value>groupBox5</value>
+ </data>
+ <data name=">>chkGoogTerrain.ZOrder" xml:space="preserve">
+ <value>0</value>
+ </data>
<data name="chkGoogStreets.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
@@ -598,7 +628,7 @@
<value>groupBox5</value>
</data>
<data name=">>chkGoogStreets.ZOrder" xml:space="preserve">
- <value>0</value>
+ <value>1</value>
</data>
<data name="chkGoogSatellite.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -625,7 +655,7 @@
<value>groupBox5</value>
</data>
<data name=">>chkGoogSatellite.ZOrder" xml:space="preserve">
- <value>1</value>
+ <value>2</value>
</data>
<data name="chkGoogHybrid.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -652,19 +682,19 @@
<value>groupBox5</value>
</data>
<data name=">>chkGoogHybrid.ZOrder" xml:space="preserve">
- <value>2</value>
+ <value>3</value>
</data>
<data name="groupBox5.Location" type="System.Drawing.Point, System.Drawing">
<value>132, 30</value>
</data>
<data name="groupBox5.Size" type="System.Drawing.Size, System.Drawing">
- <value>96, 90</value>
+ <value>114, 114</value>
</data>
<data name="groupBox5.TabIndex" type="System.Int32, mscorlib">
<value>15</value>
</data>
<data name="groupBox5.Text" xml:space="preserve">
- <value>Google Maps</value>
+ <value>Google Maps V3</value>
</data>
<data name=">>groupBox5.Name" xml:space="preserve">
<value>groupBox5</value>
@@ -763,7 +793,7 @@
<value>23, 30</value>
</data>
<data name="groupBox4.Size" type="System.Drawing.Size, System.Drawing">
- <value>99, 90</value>
+ <value>99, 114</value>
</data>
<data name="groupBox4.TabIndex" type="System.Int32, mscorlib">
<value>14</value>
@@ -865,10 +895,10 @@
<value>2</value>
</data>
<data name="groupBox3.Location" type="System.Drawing.Point, System.Drawing">
- <value>234, 30</value>
+ <value>252, 30</value>
</data>
<data name="groupBox3.Size" type="System.Drawing.Size, System.Drawing">
- <value>103, 90</value>
+ <value>103, 114</value>
</data>
<data name="groupBox3.TabIndex" type="System.Int32, mscorlib">
<value>13</value>
@@ -895,7 +925,7 @@
<value>False</value>
</data>
<data name="txtYahooApiKey.Location" type="System.Drawing.Point, System.Drawing">
- <value>23, 216</value>
+ <value>23, 182</value>
</data>
<data name="txtYahooApiKey.Multiline" type="System.Boolean, mscorlib">
<value>True</value>
@@ -918,41 +948,11 @@
<data name=">>txtYahooApiKey.ZOrder" xml:space="preserve">
<value>3</value>
</data>
- <data name="txtGoogApiKey.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
- <value>Top, Left, Right</value>
- </data>
- <data name="txtGoogApiKey.Enabled" type="System.Boolean, mscorlib">
- <value>False</value>
- </data>
- <data name="txtGoogApiKey.Location" type="System.Drawing.Point, System.Drawing">
- <value>23, 150</value>
- </data>
- <data name="txtGoogApiKey.Multiline" type="System.Boolean, mscorlib">
- <value>True</value>
- </data>
- <data name="txtGoogApiKey.Size" type="System.Drawing.Size, System.Drawing">
- <value>442, 36</value>
- </data>
- <data name="txtGoogApiKey.TabIndex" type="System.Int32, mscorlib">
- <value>11</value>
- </data>
- <data name=">>txtGoogApiKey.Name" xml:space="preserve">
- <value>txtGoogApiKey</value>
- </data>
- <data name=">>txtGoogApiKey.Type" xml:space="preserve">
- <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name=">>txtGoogApiKey.Parent" xml:space="preserve">
- <value>grpCms</value>
- </data>
- <data name=">>txtGoogApiKey.ZOrder" xml:space="preserve">
- <value>4</value>
- </data>
<data name="label7.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label7.Location" type="System.Drawing.Point, System.Drawing">
- <value>20, 200</value>
+ <value>20, 166</value>
</data>
<data name="label7.Size" type="System.Drawing.Size, System.Drawing">
<value>243, 13</value>
@@ -973,40 +973,13 @@
<value>grpCms</value>
</data>
<data name=">>label7.ZOrder" xml:space="preserve">
- <value>5</value>
+ <value>4</value>
</data>
- <data name="label6.AutoSize" type="System.Boolean, mscorlib">
- <value>True</value>
- </data>
- <data name="label6.Location" type="System.Drawing.Point, System.Drawing">
- <value>20, 134</value>
- </data>
- <data name="label6.Size" type="System.Drawing.Size, System.Drawing">
- <value>249, 13</value>
- </data>
- <data name="label6.TabIndex" type="System.Int32, mscorlib">
- <value>9</value>
- </data>
- <data name="label6.Text" xml:space="preserve">
- <value>Google Maps API Key (Required for Google Layers)</value>
- </data>
- <data name=">>label6.Name" xml:space="preserve">
- <value>label6</value>
- </data>
- <data name=">>label6.Type" xml:space="preserve">
- <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name=">>label6.Parent" xml:space="preserve">
- <value>grpCms</value>
- </data>
- <data name=">>label6.ZOrder" xml:space="preserve">
- <value>6</value>
- </data>
<data name="grpCms.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 185</value>
</data>
<data name="grpCms.Size" type="System.Drawing.Size, System.Drawing">
- <value>486, 278</value>
+ <value>486, 238</value>
</data>
<data name="grpCms.TabIndex" type="System.Int32, mscorlib">
<value>13</value>
@@ -1029,11 +1002,8 @@
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
- <data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
- <value>6, 13</value>
- </data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
- <value>492, 466</value>
+ <value>492, 426</value>
</data>
<data name=">>$this.Name" xml:space="preserve">
<value>MapCtrl</value>
More information about the mapguide-commits
mailing list