Allen,
Thanks for your post and questions.
I think James’ idea is possible, I did a simple test against the rotation of MapShapeLayer, following is the code snippet showing a 40 degree rotation on every map click, hope it helps.
private void DisplayMap_Load(object sender, EventArgs e)
{
winformsMap1.MapUnit = GeographyUnit.DecimalDegree;
winformsMap1.BackgroundOverlay.BackgroundBrush = new GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean);
// Add the mapShapeLayer to the MapEngine
MapShapeLayer mapShapeLayer = new MapShapeLayer();
MapShape mapShape1 = new MapShape(new Feature(-104, 42));
mapShape1.ZoomLevels.ZoomLevel01.DefaultPointStyle = new PointStyle(new GeoImage(@"..\..\SampleData\Data\China.png"));
mapShape1.ZoomLevels.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
mapShapeLayer.MapShapes.Add("1", mapShape1);
MapShape mapShape2 = new MapShape(new Feature(104, 39));
mapShape2.ZoomLevels.ZoomLevel01.DefaultPointStyle = new PointStyle(new GeoImage(@"..\..\SampleData\Data\China.png"));
mapShape2.ZoomLevels.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
mapShapeLayer.MapShapes.Add("2", mapShape2);
Feature feature3 = new Feature(new RectangleShape(40, 60, 60, 40));
MapShape mapShape3 = new MapShape(feature3);
mapShape3.ZoomLevels.ZoomLevel01.DefaultAreaStyle = AreaStyles.Forest1;
mapShape3.ZoomLevels.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
mapShapeLayer.MapShapes.Add("3", mapShape3);
BaseShape shape = new PointShape(-71, -52).GetShortestLineTo(new PointShape(38, 8), GeographyUnit.DecimalDegree);
MapShape mapShape4 = new MapShape(new Feature(shape));
mapShape4.ZoomLevels.ZoomLevel01.DefaultLineStyle = LineStyles.ContestedBorder2;
mapShape4.ZoomLevels.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
mapShapeLayer.MapShapes.Add("4", mapShape4);
LayerOverlay layerOVerlay = new LayerOverlay();
layerOVerlay.Layers.Add("mapShapeLayer", mapShapeLayer);
winformsMap1.Overlays.Add("layerOVerlay", layerOVerlay);
winformsMap1.CurrentExtent = new RectangleShape(65, 30, 95, 15);
winformsMap1.MapClick += new EventHandler<MapClickWinformsMapEventArgs>(winformsMap1_MapClick);
winformsMap1.Refresh();
}
void winformsMap1_MapClick(object sender, MapClickWinformsMapEventArgs e)
{
RotationProjection rotationProjection = new RotationProjection(40);
rotationProjection.Open();
LayerOverlay layerOverlay = (LayerOverlay)winformsMap1.Overlays["layerOVerlay"];
MapShapeLayer mapShapeLayer = (MapShapeLayer) layerOverlay.Layers[0];
foreach (MapShape mapShape in mapShapeLayer.MapShapes.Values)
{
mapShape.Feature = rotationProjection.ConvertToExternalProjection(mapShape.Feature);
}
winformsMap1.Refresh(layerOverlay);
}
Any more questions or concerns please do not hesitate to let me know.
Thanks.
Yale