Hi everyone,
I have this code to put in background the layers of VE:
Code:
{
Map1.BackgroundFillBrush = new GeoSolidBrush(GeoColor.FromHtml("#B3C6D4"));
Map1.CurrentExtent = new RectangleShape(-131.22, 55.05, -54.03, 16.91);
Map1.MapUnit = GeographyUnit.DecimalDegree;
Map1.ClientCache.CacheId = "WorldLayer";
Map1.ServerCache.CacheDirectory = MapPath("~/ImageCache/" + Request.Path);
ShapeFileLayer worldLayer = new ShapeFileLayer(MapPath("~\World\cntry02.shp"));
worldLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.GetSimpleAreaStyle(GeoColor.FromArgb(255, 243, 239, 228), GeoColor.FromArgb(255, 218, 193, 163), 1);
worldLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
Map1.StaticLayers.Add("WorldLayer", worldLayer);
Map1.BackgroundMap.VirtualEarthMap.VirtualEarthMapType = VirtualEarthMapType.Aerial;
Map1.BackgroundMap.VirtualEarthMap.Name = "Virtual Earth Map";
Map1.BackgroundMap.VirtualEarthMap.LibraryUri = "";
}
My problem is: when i put the URL of VE (for example the code given in virtual maps) he say: "Cannot implicitly convert type 'string' to 'System.Uri". And the only options i have is VirtualEarthMap.LibraryUri or .Name or .VirtualEarthType so i need to put a string but he don´t accept
Anuone knows what i need to do to solve this??
Thanks