Hi I am using the code below to generate my bottom layer map
Map1.CustomOverlays.Clear();
EyascoWebFramework.BLL.Map.Map map = EyascoWebFramework.BLL.Map.Map.GetMapByID(Convert.ToInt32(ddlMapChooser.SelectedValue));
//Setting up the Map
Map1.Width = map.MapWidth;
Map1.Height = map.MapHeight;
Map1.MapBackground.BackgroundBrush = new GeoSolidBrush(GeoColor.FromHtml(map.MapBackgroundColor));
Map1.CurrentExtent = new RectangleShape(map.MapMinLong, map.MapMaxLat, map.MapMaxLong, map.MapMinLat);
Map1.MapTools.PanZoomBar.Enabled = map.MapShowDashboard;
Map1.MapTools.MeasureMapTool.Enabled = true;
Map1.MapTools.MeasureMapTool.MeasureType = MeasureType.None;
Map1.MapTools.AnimationPanMapTool.Enabled = true;
//Creating the Base layer
WorldMapKitWmsWebOverlay mapoverlay = new WorldMapKitWmsWebOverlay();
mapoverlay.TransitionEffect = TransitionEffect.Stretching;
mapoverlay.IsBaseOverlay = false;
Map1.CustomOverlays.Add(mapoverlay);
And everything works fine. I modified the code to use a googleLayer instead and I projected my Rectangleshape since it is coming from the database in Degrees
Map1.CustomOverlays.Clear();
EyascoWebFramework.BLL.Map.Map map = EyascoWebFramework.BLL.Map.Map.GetMapByID(Convert.ToInt32(ddlMapChooser.SelectedValue));
Proj4Projection proj4 = new Proj4Projection();
proj4.InternalProjectionParametersString = Proj4Projection.GetEpsgParametersString(4326);
proj4.ExternalProjectionParametersString = Proj4Projection.GetGoogleMapParametersString();
RectangleShape rec = new RectangleShape(map.MapMinLong, map.MapMaxLat, map.MapMaxLong, map.MapMinLat);
//Setting up the Map
Map1.Width = map.MapWidth;
Map1.Height = map.MapHeight;
Map1.MapBackground.BackgroundBrush = new GeoSolidBrush(GeoColor.FromHtml(map.MapBackgroundColor));
proj4.Open();
Map1.CurrentExtent = proj4.ConvertToExternalProjection(rec);
proj4.Close();
Map1.MapTools.PanZoomBar.Enabled = map.MapShowDashboard;
Map1.MapTools.MeasureMapTool.Enabled = true;
Map1.MapTools.MeasureMapTool.MeasureType = MeasureType.None;
Map1.MapTools.AnimationPanMapTool.Enabled = true;
GoogleOverlay Googlayer = new GoogleOverlay();
Googlayer.JavaScriptLibraryUri = new Uri(ConfigurationManager.AppSettings["GoogleUri"]);
Googlayer.GoogleMapType = GoogleMapType.Satellite;
Map1.CustomOverlays.Add(Googlayer);
However now I am getting the following error message "Microsoft JScript runtime error: 'mapParser' is undefined". I tried removing the map form the update panel and I just got the latest DLL about a month ago? Any ideas?.
thanks Leon