Hi,
I am not able to set proper graticule label in polar stereographic projection.
But, it’s work out in ‘Mercator’ projection.
I tried to set graticule labels in different ways.
1.
GraticuleAdornmentLayer graticuleAdornmentLayer = new GraticuleAdornmentLayer();
graticuleAdornmentLayer.Projection = _proj;
graticuleAdornmentLayer.GraticuleLineStyle = LineStyles.CreateSimpleLineStyle(GeoColor.SimpleColors.Silver, 0.001F, LineDashStyle.Dash, false);
wfMap.AdornmentOverlay.Layers.Add(“GraticuleAdornmentLayer”, graticuleAdornmentLayer);
ShapeFileFeatureLayer shplatlon1 = new ShapeFileFeatureLayer(@"…/…/Data/Graticule/graticules_1.shp");
shplatlon1.FeatureSource.Projection = _proj;
shplatlon1.RequireIndex = false;
shplatlon1.ZoomLevelSet.ZoomLevel10.DefaultLineStyle = new LineStyle(new GeoPen(GeoColor.StandardColors.SlateGray, 0.001F));
shplatlon1.ZoomLevelSet.ZoomLevel10.DefaultTextStyle = new TextStyle(“display”, new GeoFont(“Arial”, 20), new GeoSolidBrush(GeoColors.Red));
shplatlon1.ZoomLevelSet.ZoomLevel10.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
ShapeFileFeatureLayer shplatlon5 = new ShapeFileFeatureLayer(@"../../Data/Graticule/graticules_5.shp");
shplatlon5.FeatureSource.Projection = _proj;
shplatlon5.RequireIndex = false;
shplatlon5.ZoomLevelSet.ZoomLevel07.DefaultLineStyle = new LineStyle(new GeoPen(GeoColor.StandardColors.SlateGray, 0.001F));
shplatlon5.ZoomLevelSet.ZoomLevel07.DefaultTextStyle = new TextStyle("display", new GeoFont("Arial", 20), new GeoSolidBrush(GeoColors.Red));
shplatlon5.ZoomLevelSet.ZoomLevel07.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level10;
ShapeFileFeatureLayer shplatlon10 = new ShapeFileFeatureLayer(@"../../Data/Graticule/graticules_10.shp");
shplatlon10.FeatureSource.Projection = _proj;
shplatlon10.RequireIndex = false;
shplatlon10.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = new LineStyle(new GeoPen(GeoColor.StandardColors.SlateGray, 0.001F));
shplatlon10.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = new TextStyle("display", new GeoFont("Arial", 20), new GeoSolidBrush(GeoColors.Red));
shplatlon10.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level07;
ShapeFileFeatureLayer shapeBoundary = new ShapeFileFeatureLayer(@"../../Data/Graticule/graticules_boundary.shp");
shapeBoundary.FeatureSource.Projection = _proj;
shapeBoundary.RequireIndex = false;
shapeBoundary.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = new LineStyle(new GeoPen(GeoColor.StandardColors.SlateGray, 0.001F));
shapeBoundary.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level07;
LayerOverlay latlonOverlay = new LayerOverlay();
latlonOverlay.Layers.Add("Graticule1", shplatlon1);
Overlay.Layers.Add("Graticule5", shplatlon5);
latlonOverlay.Layers.Add("Graticule10", shplatlon10);
latlonOverlay.Layers.Add("GraticuleBoundary", shapeBoundary);
wfMap.Overlays.Add("GraticuleOverlay", latlonOverlay);
Here, I am attaching snapshots of my application.
help me to fix this issue.
Thanks,
Riyaz