Hi all,
I am trying to use the MapSuite to display an airport map. When I convert the map to a new projection,I get a ploblem that the map does not show. Because the map is Riga Airport, so I think <3059> should be the right one. That's right? And If remove the line "TaxiwayShapeLayer.FeatureSource.Projection = proj4Projection;", it works well but the map seems distorted.
Attached is the map shape files.
Please help with this problem.
Regards,
Feng
The code as following:
private void UserADifferentProjectionForAFeatureLayer_Load(object sender, EventArgs e)
{
winformsMap1.MapUnit = GeographyUnit.DecimalDegree;
winformsMap1.BackgroundOverlay.BackgroundBrush = new GeoSolidBrush(GeoColor.StandardColors.Black);
// If want to know more srids, please refer Projections.rtf in Documentation folder.
Proj4Projection proj4Projection = new Proj4Projection();
proj4Projection.InternalProjectionParametersString = Proj4Projection.GetEpsgParametersString(4326);
proj4Projection.ExternalProjectionParametersString = Proj4Projection.GetEpsgParametersString(3059);
ShapeFileFeatureLayer TaxiwayShapeLayer = new ShapeFileFeatureLayer(@"D:\Maps\taxiway.shp");
TaxiwayShapeLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
TaxiwayShapeLayer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle.OuterPen.Color = GeoColor.StandardColors.GreenYellow;
TaxiwayShapeLayer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle.OuterPen.Width = 1;
TaxiwayShapeLayer.FeatureSource.Projection = proj4Projection;
TaxiwayShapeLayer.RequireIndex = false;
LayerOverlay staticOverlay = new LayerOverlay();
staticOverlay.Layers.Add("TaxiwayShapeLayer", TaxiwayShapeLayer);
winformsMap1.Overlays.Add(staticOverlay);
winformsMap1.CurrentExtent = new RectangleShape(23.963333333, 56.933333333,23.99166666666666667, 56.916666849);
winformsMap1.Refresh();
}
EVRA.zip (90.9 KB)