ShapeFileFeatureLayer mypipeline = new ShapeFileFeatureLayer(_MapPath + "ROADS_RC_2_AND_RC_3_polyline.shp"); // mypipeline.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(TextStyles.ContestedBorder1("NAME")); mypipeline.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.LocalRoad4; mypipeline.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; mypipeline.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.LocalRoad4("NAME"); mypipeline.DrawingMarginPercentage = 100; ShapeFileFeatureLayer mylandBaseRegion = new ShapeFileFeatureLayer(_MapPath + "LAND_BASE_region.shp"); // mylandBaseRegion.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(TextStyles.Country1("TOWN")); mylandBaseRegion.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.Interstate1; //LineStyles.ContestedBorder2; mylandBaseRegion.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; // mylandBaseRegion.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(TextStyles.Country1("TOWN")); mylandBaseRegion.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.Interstate1("NAME"); mylandBaseRegion.DrawingMarginPercentage = 100; mylandBaseRegion.Open(); ShapeFileFeatureLayer myparkRegion = new ShapeFileFeatureLayer(_MapPath + "PARK_region.shp"); myparkRegion.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.Utility1; myparkRegion.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; myparkRegion.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.Utility1("SUBURB"); myparkRegion.DrawingMarginPercentage = 100; // myparkRegion.Open(); // ShapeFileFeatureLayer myPOI = new ShapeFileFeatureLayer(_MapPath + "SETTLEMENT_POI_point.shp"); myPOI.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.Interstate2; myPOI.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; myPOI.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.Interstate2("NAME"); myPOI.DrawingMarginPercentage = 100; // myparkRegion.Open(); // ShapeFileFeatureLayer myURBAN = new ShapeFileFeatureLayer(_MapPath + "URBAN_AREAS_region.shp"); myURBAN.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.Interstate3; myURBAN.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; myURBAN.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.Interstate3("NAME"); myURBAN.DrawingMarginPercentage = 100; // ShapeFileFeatureLayer myRail = new ShapeFileFeatureLayer(_MapPath + "RAILWAY_polyline.shp"); myRail.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.Railway1; myRail.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; myRail.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.Railway1("NAME"); myRail.DrawingMarginPercentage = 100; // ShapeFileFeatureLayer myHyDRO = new ShapeFileFeatureLayer(_MapPath + "HYDRO_SHAPE_MAJOR_region.shp"); myHyDRO.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.River1; myHyDRO.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; myHyDRO.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.River1("NAME"); myHyDRO.DrawingMarginPercentage = 100; // ShapeFileFeatureLayer myHyDROline = new ShapeFileFeatureLayer(_MapPath + "HYDRO_LINE_MAJOR_polyline.shp"); myHyDROline.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.River2; myHyDROline.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; myHyDROline.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.River2("NAME"); myHyDROline.DrawingMarginPercentage = 100; // ShapeFileFeatureLayer myRCO = new ShapeFileFeatureLayer(_MapPath + "RC0 label v1_1_polyline.shp"); myRCO.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.SecondaryRoad2; myRCO.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; myRCO.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.SecondaryRoad2("NAME"); myRCO.DrawingMarginPercentage = 100; // ShapeFileFeatureLayer mySub = new ShapeFileFeatureLayer(_MapPath + "Urban subname_region.shp"); mySub.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.Interstate4; mySub.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; mySub.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.Interstate4("NAME"); mySub.DrawingMarginPercentage = 100; // ShapeFileFeatureLayer myRC456 = new ShapeFileFeatureLayer(_MapPath + "RC456_polyline.shp"); myRC456.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.SecondaryRoad1; myRC456.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; myRC456.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.SecondaryRoad1("NAME"); myRC456.DrawingMarginPercentage = 100; // ShapeFileFeatureLayer myFerryRd = new ShapeFileFeatureLayer(_MapPath + "FERRY_ROADS_polyline.shp"); myFerryRd.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.LocalRoad2; myFerryRd.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; myFerryRd.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.LocalRoad2("NAME"); myFerryRd.DrawingMarginPercentage = 100; // ShapeFileFeatureLayer myRC1 = new ShapeFileFeatureLayer(_MapPath + "ROADS_RC_1_polyline.shp"); myRC1.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.Highway5; myRC1.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; myRC1.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.Highway5("NAME"); myRC1.DrawingMarginPercentage = 100; // ShapeFileFeatureLayer myRC0 = new ShapeFileFeatureLayer(_MapPath + "ROADS_RC_0_polyline.shp"); myRC0.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.MajorRoad1; myRC0.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; myRC0.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.MajorRoad1("NAME"); myRC0.DrawingMarginPercentage = 100; // RectangleShape extBox = mylandBaseRegion.GetBoundingBox(); wpfMap1.CurrentExtent = extBox; LayerOverlay staticOverlay = new LayerOverlay(); staticOverlay.Layers.Add("pipeline", mypipeline); staticOverlay.Layers.Add("landbase", mylandBaseRegion); staticOverlay.Layers.Add("MapLayerPark",myparkRegion); staticOverlay.Layers.Add("MyPoi", myPOI); staticOverlay.Layers.Add("MyURBAN", myURBAN); staticOverlay.Layers.Add("MyRail", myRail); staticOverlay.Layers.Add("MyHYDRO", myHyDRO); staticOverlay.Layers.Add("MyHYDROline", myHyDROline); staticOverlay.Layers.Add("MyRCO", myRCO); staticOverlay.Layers.Add("MySub", mySub); staticOverlay.Layers.Add("MyRC456", myRC456); staticOverlay.Layers.Add("MyFerryRd", myFerryRd); staticOverlay.Layers.Add("MyRC1", myRC1); staticOverlay.Layers.Add("MyRC0", myRC0); wpfMap1.Overlays.Add(staticOverlay); wpfMap1.Refresh();