Hi,
I am using GraticuleAdornmentLayer with different projections. In polar stereographic projection its showing only 135E,135W,00Lat lines. I want to show every five diegree latlon lines as it shown in mercator projection. Please guide how to enable it.
Thanks & Regards,
Goral
GraticuleAdornmentLayer
Hi Goral,
I am afraid to say we don’t support this feature, but I have reported it in our issue system so that we can do it in the future.
Sorry for any inconvenience.
Thanks,
Troy
Hi,
Thanks for reply. Now another question on GraticuleAdornmentLayer so I am continuing in same post. In shapefilefeaturelayer we have zoomlevel set is available.
we can do on off of the layer according to zoomlevel. By writing code as below.
worldLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
Is this facility available for GraticuleAdornmentLayer?
Thanks & Regards,
Goral
Hi Goral,
In general, style of
GraticuleAdornmentLayer will not change during the runtime, so they don’t
maintain a ZoomLevelSet property. If you just want do some works depending on different ZoomLevel. Please try codes
below to customize the GraticuleAdornmentLayer:
public
class
CustomGraticuleAdornmentLayer : GraticuleAdornmentLayer
{
protected
override
void
DrawCore(GeoCanvas canvas, System.Collections.ObjectModel.Collection<SimpleCandidate> labelsInAllLayers)
{
ZoomLevelSet zoomlevelSet;
GeographyUnit mapUnit;
if
(Projection ==
null
|| (Projection
as
Proj4Projection).ExternalProjectionParametersString == Proj4Projection.GetDecimalDegreesParametersString())
{
zoomlevelSet =
new
ZoomLevelSet();
mapUnit = GeographyUnit.DecimalDegree;
}
else
{
zoomlevelSet =
new
SphericalMercatorZoomLevelSet();
mapUnit = GeographyUnit.Meter;
}
ZoomLevel currentZoomlevel = zoomlevelSet.GetZoomLevel(canvas.CurrentWorldExtent, canvas.Width, mapUnit);
Collection<ZoomLevel> zoomlevels = zoomlevelSet.GetZoomLevels();
if
(currentZoomlevel.Scale > zoomlevels[10].Scale)
{
this
.GraticuleLineStyle = LineStyles.CreateSimpleLineStyle(GeoColor.StandardColors.Red, 2,
false
);
}
else
{
this
.GraticuleLineStyle = LineStyles.CreateSimpleLineStyle(GeoColor.StandardColors.Green, 2,
false
);
}
base
.DrawCore(canvas, labelsInAllLayers);
}
}
Hope this will help and any
other question please feel free to let us know.
Thanks,