Hello,
With MapSuite Desktop 5.0, is it possible to add a LayerOverlay on a GoogleMapsOverlay ?
In the sample GPStoGoogleMapDesktop, I tried to add the LayerOverlay from sample data USStates.shp, without success.
private void TestForm_Load(object sender, EventArgs e)
{
winformsMap1.MapUnit = GeographyUnit.Meter;
winformsMap1.BackgroundOverlay.BackgroundBrush = new GeoSolidBrush(GeoColor.FromArgb(255, 198, 255, 255));
LayerOverlay layerOverlay = new LayerOverlay();
GoogleMapsOverlay googleOverlay = new GoogleMapsOverlay(); //(@"Insert your key here!", @"C:\GoogleCache");
googleOverlay.MapType = GoogleMapsMapType.Hybrid;
winformsMap1.Overlays.Add(googleOverlay);
layerOverlay.Layers.Add("Google", googleOverlay);
//==========================================================================
// Add LayerOverlay : SampleData\\Data\\USStates.shp
//==========================================================================
ShapeFileFeatureLayer worldLayer = new ShapeFileFeatureLayer("D:\\ThinkGeo\\Map Suite Desktop Evaluation Edition 5.0\\Samples\\SampleData\\Data\\USStates.shp");
worldLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.CreateSimpleAreaStyle( GeoColor.SimpleColors.Transparent, GeoColor.FromArgb(100, GeoColor.SimpleColors.Red));
worldLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle.OutlinePen.LineJoin = DrawingLineJoin.Round;
worldLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
LayerOverlay staticOverlay = new LayerOverlay();
staticOverlay.Layers.Add("WorldLayer", worldLayer);
winformsMap1.Overlays.Add(staticOverlay);
//============================================================================
// ...
The LayerOverlay USStates.shp is not displayed. May be I miss something !
Regards,
Eric