Hi guys,
I was wondering how do I use the GoogleMapZoomLevelSet to add a layer on google maps depending on a zoom level which can be configured. The problem that I am trying to solve is I am trying to draw zip boundaries after a certain zoom level. My approach to the prob was as follows:
private BaseLayer AddZipLayer()
{
var zipLayer = new AreaLayer("ZipLayer", ConfigurationManager.AppSettings[ConstZipCodeShapeFile);
var outlinePen = new GeoPen(GeoColor.StandardColors.HotPink);
var fillBrush = new GeoSolidBrush(GeoColor.StandardColors.Transparent);
var minZoomLevelZip = ConfigurationManager.AppSetting[ShowZipBoundary];
var googleMapZoomLevelSet = new GoogleMapZoomLevelSet();
var zoomLevelToApplyStyleAt= googleMapZoomLevelSet.GetZoomLevelAtIndex(minZoomLevelZip);
zoomLevelToApplyStyleAt.DefaultAreaStyle = new AreaStyle(outlinePen, fillBrush);
zoomLevelToApplyStyleAt.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
zipLayer.FeatureLayer.ZoomLevelSet = googleMapZoomLevelSet;
return zipLayer;
}
Am I doing something wrong here?