I have two shape files one for states and one for cities.On first load it should display states and when i zoomin it should display the cities.The below code displays only state even if i zoom in.The city in shape file also are of area style and not point style.Can somebody advice how to achieve this.
protected
void
Page_Load(
object
sender, EventArgs e)
{
Map1.MapBackground.BackgroundBrush =
new
GeoSolidBrush(GeoColor.FromHtml(
"#E5E3DF"
));
Map1.CurrentExtent =
new
RectangleShape(-125, 72, 50, -46);
Map1.MapUnit = GeographyUnit.Meter;
LayerOverlay staticOverlay =
new
LayerOverlay(
"WorldStaticOverlay"
);
ShapeFileFeatureLayer worldLayer =
new
ShapeFileFeatureLayer(
"C:\Work\Maps\States.shp"
);
worldLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.CreateSimpleAreaStyle(GeoColor.SimpleColors.Transparent, GeoColor.FromArgb(100, GeoColor.SimpleColors.DarkRed));
worldLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level05;
staticOverlay.Layers.Add(
"worldLayer"
, worldLayer);
ShapeFileFeatureLayer worldLayer1 =
new
ShapeFileFeatureLayer(
"C:\Work\Maps\Cities.shp"
);
worldLayer1.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.CreateSimpleAreaStyle(GeoColor.SimpleColors.Transparent, GeoColor.FromArgb(100, GeoColor.SimpleColors.Green));
worldLayer1.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
LayerOverlay staticOverlay1 =
new
LayerOverlay();
staticOverlay1.Layers.Add(worldLayer1);
Map1.CustomOverlays.Add(staticOverlay);
Map1.CustomOverlays.Add(staticOverlay1);
}