private void UseRotationProjectionForAFeatureLayer_Load(object sender, EventArgs e) { winformsMap1.MapUnit = GeographyUnit.Meter; winformsMap1.BackgroundOverlay.BackgroundBrush = new GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean); ShapeFileFeatureLayer worldLayer = new ShapeFileFeatureLayer(@"..\..\SampleData\Data\Countries02.shp"); worldLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Sand1; worldLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; rotateProjection = new RotationProjection(); worldLayer.FeatureSource.Projection = rotateProjection; LayerOverlay worldOverlay = new LayerOverlay(); worldOverlay.Layers.Add("WorldLayer", worldLayer); winformsMap1.Overlays.Add("WorldOverlay", worldOverlay); winformsMap1.ZoomLevelSnapping = ZoomLevelSnappingMode.None; winformsMap1.CurrentExtent = rotateProjection.GetUpdatedExtent(new RectangleShape(-180.0, 83.0, 180.0, -90.0)); winformsMap1.MapClick += new EventHandler(winformsMap1_MapClick); winformsMap1.Refresh(); } void winformsMap1_MapClick(object sender, MapClickWinformsMapEventArgs e) { LayerOverlay worldOverlay = winformsMap1.Overlays["WorldOverlay"] as LayerOverlay; ShapeFileFeatureLayer worldLayer = worldOverlay.Layers["WorldLayer"] as ShapeFileFeatureLayer; worldLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country1; winformsMap1.Refresh(); } private void btnRotateCounterclockwise_Click(object sender, EventArgs e) { rotateProjection.Angle += 20; winformsMap1.CurrentExtent = rotateProjection.GetUpdatedExtent(winformsMap1.CurrentExtent); winformsMap1.Refresh(winformsMap1.Overlays["WorldOverlay"]); } private void btnRotateClockwise_Click(object sender, EventArgs e) { rotateProjection.Angle -= 20; winformsMap1.CurrentExtent = rotateProjection.GetUpdatedExtent(winformsMap1.CurrentExtent); winformsMap1.Refresh(winformsMap1.Overlays["WorldOverlay"]); }